Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/101889

From BetaArchive Wiki

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

REFERENCES

"Function Reference", version 4.0, page 241 "Function Reference", version 3.0, page 131


KBCategory: kbdocerr

KBSubcategory:

Additional reference words: 4.00 3.00



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
©1997 Microsoft Corporation. All rights reserved. Legal Notices.