Microsoft KB Archive/110015

From BetaArchive Wiki

Problem Using Wind

Q110015



The information in this article applies to:


  • Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows, version 7.0





SYMPTOMS

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.



STATUS

This feature (the focus window becoming the top window) is under review and will be considered for inclusion in a future release.



WORKAROUND

An effective workaround is to use the WordBasic Activate statement instead of the Window<Number> statement. For example:

Activate(NameOfWindow$)



MORE INFORMATION

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.

Additional query words: winword2 2.0 word6 winword 7.0 word95 word7 6.0

Keywords :
Issue type :
Technology :


Last Reviewed: November 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.