XL2002: DDE Clients Cannot Use a RUN Command to Run an Inline Macro After a Security Update

This article has been archived. It is offered "as is" and will no longer be updated.
Client applications can use Dynamic Data Exchange (DDE) to issue a macro RUN command to Excel 2002. This command may stop working after the user updates to Service Pack 2. To the client application, the method call appears to succeed, but the macro does not run. This problem occurs if the DDE client uses an inline macro string and not a macro name in the RUN command.

Note The purpose of using an inline macro is to pass parameters to a macro.
Microsoft released a security update in June 2002 for all versions of Excel. This security update purposely blocked inline macro evaluations if the user did not have Macro Security set to Low. For additional information about the security update, click the following article number to view the article in the Microsoft Knowledge Base:
324458 MS02-031: June 19, 2002 Cumulative Patches for Microsoft Excel and Microsoft Word
Because of the security update, DDE clients that use inline macro strings with the RUN command may fail to work as expected. These clients may display an error message or may show strange behavior if they fail to run the macro.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.After the hotfix is installed, the English version of this fix will have the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time      Size     File name   ------------------------------------------   17-May-2003  04:13  16,553,592  Excelff.msp   17-May-2003  03:03   4,853,832  Excelop.msp   17-May-2003  03:20       6,544  Readme.txt				
The English version of this fix should have the		  following file attributes or later:   Date         Time   Version          Size      File name   --------------------------------------------------------   16-May-2003  16:43  10.0.5313.0     9,177,672  Excel.exe				
This fix is a post-Office XP Service Pack 2 (SP-2) fix. To install the fix, you must have Office XP SP-2 installed. For additional information about Office XP SP-2, click the following article number to see the article in the Microsoft Knowledge Base:
325671 OFFXP: Overview of the Office XP Service Pack 2
Additionally, you may have to install Windows Installer 2.0 to install this fix. For additional information about the Windows Installer requirement for post-Office XP SP-2 fixes, click the following article number to see the article in the Microsoft Knowledge Base:
330537 OFFXP: Office XP Updates and Patches Released After September 2002 May Require Windows Installer 2.0

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
More information

Service Pack Information

This problem was first corrected in Office XP Service Pack 3.To resolve this problem, obtain the latest service pack for Microsoft Office XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
307841 How to obtain the latest Office XP Service Pack
After the hotfix is applied, inline macro calls that are raised by trusted clients (DDE or Automation) now run as expected if the macro that is invoked is in a workbook that has been trusted by the user through a security prompt (in Medium Security) or that has been digitally signed and previously trusted (in High Security). DDE clients that add macros dynamically or that intend to run non-trusted macros without user interaction continue to be blocked as a potential security risk to the user.

Steps to Reproduce the Problem

  1. Install Excel 2002 Service Pack 2 as directed in the following Knowledge Base article:
    307841 OFFXP: How to Obtain the Latest Office XP Service Pack
  2. Run Excel 2002, and then press ALT+F11 to open the Microsoft Visual Basic for Applications (VBA) Editor.
  3. On the Insert menu, click Module to add a new code module. Add the following code to the module:
    Sub MyMacro(s As String)  MsgBox s, vbMsgBoxSetForegroundEnd Sub
  4. Leave Excel running, and then open Microsoft Word 2002 (or another VBA host application). Press ALT+F11 to open the VBA Editor for Word.
  5. In the code window for ThisDocument, add the following code:
    Public Sub Test()   Dim chan As Long   AppActivate "Microsoft Excel"   chan = DDEInitiate(App:="Excel", Topic:="System")   DDEExecute chan, "[RUN(""'MyMacro """"Hello from DDE.""""'"")]"   DDETerminate chanEnd Sub
  6. Press F5 to run the Word macro. If you are prompted, select ThisDocument.test as the macro that you want to run. Notice that the Excel macro is never called if the Macro Security level of Excel is set to High or to Medium. No error is raised to indicate that the call failed.

    If the Macro Security level of Excel is set to Low, or if you install the hotfix that is mentioned in this article, you may receive the message that is raised by the Excel macro when it runs the DDE code.

Article ID: 821136 - Last Review: 10/26/2013 07:45:00 - Revision: 4.0

  • Microsoft Excel 2002 Standard Edition
  • kbnosurvey kbarchive kbautohotfix kbqfe kbhotfixserver kbbug kbofficexppresp3fix kbfix KB821136