Microsoft KB Archive/101889

= Microsoft Knowledge Base =

Can't Use EXECUTE with INITIATE with Word for Macintosh
Last reviewed: September 12, 1996

Article ID: Q101889

The information in this article applies to:


 * Microsoft Excel for the Macintosh, versions 3.0 and 4.0

The example for using the INITIATE function on page 241 of the "Function Reference" for version 4.0, and pages 130-131 for version 3.0, is incorrect for Microsoft Excel for the Macintosh.

In Microsoft Excel for the Macintosh, you cannot use the EXECUTE function to send key combinations to Microsoft Word for the Macintosh. When you run a macro that contains this function, Microsoft Word will ignore these statements.

MORE INFORMATION
Microsoft Word and Microsoft Excel can support the use of dynamic data exchange (DDE) when running under Apple Macintosh system software versions 7.0 or later. However, Microsoft Word for the Macintosh can't receive key commands through a DDE macro.

There are also limitations of using DDE within a macro because of the lack of a macro language in Microsoft Word for the Macintosh versions 4.0, 5.0, and 5.1. The following is the macro listed on page 241 of the "Microsoft Excel Function Reference" for version 4.0. (B5 is defined as the name "Channel"):

B4: =EXEC("HardDisk:Microsoft Word") B5: =INITIATE("Microsoft Word","Untitled") B6: =EXECUTE(Channel,"*V") B7: =EXECUTE(Channel,"*P~") B8: =APP.ACTIVATE(,FALSE) B9: =CREATE.OBJECT(6,"R9C2",,,"R15C4",,) B10: =PASTE B11: =TERMINATE(Channel) B12: =RETURN In the above macro, B6 and B7 will appear to be skipped when running the macro. The only DDE function that is supported is POKE. POKE allows Microsoft Excel to send information to Microsoft Word and can be used to replace the EXECUTE statement in B6.

For more information about problems associated with this macro function and DDE, query on the following words in the Microsoft Knowledge Base:

word and initiate and DDE and worddocument