ID: Q110015
The information in this article applies to:
When you execute the WordBasic Window<Number> command from a dynamic data exchange (DDE) client to Word for Windows, you may get unexpected results. For example, the window specified may obtain the focus, but it won't become the top window unless it was the top window prior to executing the DDE command.
By contrast, if you execute the Window<Number> command from within Word for Windows itself, the specified window both obtains the focus and becomes the top window.
This feature (the focus window becoming the top window) is under review and will be considered for inclusion in a future release.
An effective workaround is to use the WordBasic Activate statement instead of the Window<Number> statement. For example:
Activate(NameOfWindow$)
The WordBasic Window<Number> command is used to activate a specific window based on its number as listed under the Window menu command. For example, if you have two new document windows listed under the Window menu command as "1 Document1" and "2 Document2," you can switch from Document1 to Document2 by running the following macro:
Sub Main
Window2
End Sub
If the focus is on Document1, running this command will activate the
Document2 window, giving it the focus and bringing it to the top.
NOTE: If your windows are tiled, Window<Number> sets the focus to the specified window; it does not maximize the window and place it on top.
By contrast, when you execute the Window<Number> command from a DDE client, the focus is set to the specified window, but the window is not placed on top.
Kbcategory: kbusage kbmacro KBSubcategory: Additional query words: winword2 2.0 2.0a 2.0b 2.0c word6 winword 7.0 word95 word7 2.0a-CD 6.0 winword
Version : 2.x 6.0 6.0a 6.0c 7.0
Platform : WINDOWS
Last Reviewed: July 30, 1997