Microsoft KB Archive/65708

Using APP.ACTIVATE to Activate Excel in a WinWord Macro

PSS ID Number: Q65708 Article last modified on 06-10-1991

1.00 1.10 WINDOWS

Summary: When using the APP.ACTIVATE macro function to activate Microsoft Excel through a macro in Word for Windows, the syntax should be Appactivate “Microsoft Excel”,1. Trying to specify the exact name of the window (such as “Microsoft Excel - sheet1”) will result in the error message: WordBASIC err=504: Window does not exist The syntax for APP.ACTIVATE is Appactivate Windowtext$, [immediate]. For other applications (such as Notepad) you can specify the name of the file (for example, “Notepad - WIN.INI”). This will not work with Microsoft Excel.

Reference(s): “Microsoft Word for Windows Technical Reference,” page 192, Microsoft Press, 1990.

Additional reference words: w4werror w4wmacro