Excel: How to Run a Word for Windows Macro from ExcelID: Q94364
|
In Microsoft Excel for Windows, you can use the EXECUTE() function to run version 2.0 Microsoft Word for Windows macros in a dynamic data exchange (DDE) macro.
Microsoft provides macro examples for illustration only, without
warranty either expressed or implied, including but not limited
to the implied warranties of merchantability and/or fitness for
a particular purpose. This macro is provided 'as is' and Microsoft
does not guarantee that the following code can be used in all
situations. Microsoft does not support modifications of the code
to suit customer requirements.
The following is a sample macro that runs a Microsoft Word for Windows
macro called TEST from Microsoft Excel. In order to run this macro,
use the WordBasic command ToolsMacro in the EXECUTE() function.
A1: =INITIATE("winword","system")
A2: =EXECUTE(A1,"[ToolsMacro.Name=""TEST"",.Run]")
A3: =TERMINATE(A1)
A4: =RETURN()
"Function Reference," version 4.0, pages 139-140
"Function Reference," version 3.0, pages 71-72
Additional query words: 3.0 3.00 4.0 4.00 4.0a 4.00a 5.0 word basic run
Keywords :
Version : 3.00 4.00 4.00a 5.00 5.00c 7.00
Platform : WINDOWS
Issue type :
Last Reviewed: March 30, 1999