The information in this article applies to:
SUMMARYThis article describes a very simple example of using dynamic data exchange (DDE) to execute a Word for Windows macro from Microsoft Access. The example in this article has very little error checking and assumes a working knowledge of both products. MORE INFORMATIONThe commands used--DDEInitiate, DDEExecute--are very similar between Word and Microsoft Access, so the process should be familiar if you have worked with DDE using Word. One of the challenges of getting this process to work properly is that the command string for running a macro that is sent to Word for Windows is syntactically rigid. The syntax for the macro command in the DDE conversation must be:
Representing this string in Microsoft Access can look visually confusing
because the quotation marks are used in the command string and also
in the assignment syntax for Microsoft Access. If this were to be written
explicitly it would look like:
In the example below, this string has been broken up to help explain
how the command line is built. Concatenating these yields the required
syntax for the DDEExecute argument.
q$ is defined as ASCII character 34, which is the quotation mark.To create a simple example in Microsoft Access that runs a Word for Windows macro:
Additional query words: winword2 2.00a 2.00a-CD 2.00b 2.00c word7 word6 winword word95
Keywords : |
Last Reviewed: October 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |