Microsoft KB Archive/210582

= WD2000: Closing Document with AutoClose/Document_Close Appears to Hang Browser =

Article ID: 210582

Article Last Modified on 6/17/2005

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q210582



SYMPTOMS
When you open a Word document in an Internet browser, moving to a previous page appears to make the Internet browser stop responding (hang). An hourglass icon appears until you select the Word icon on the taskbar.



CAUSE
When you open a document in an Internet browser and the document contains an AutoClose or Document_Close event macro that displays a message box, moving to a previous page results in the message box appearing behind the browser. An hourglass is displayed until you select the Word icon on the taskbar. The message box then appears in front of the browser.



WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

To work around this problem, you can add the Visual Basic for Applications command line Application.WindowState = wdWindowStateMinimize to your AutoClose or Document_Close event macro.

The following example Visual Basic for Applications AutoClose macro demonstrates this workaround:

Sub AutoClose

' Minimize Word. Application.WindowState = wdWindowStateMinimize

' Display a message. MsgBox "Your message"

End Sub



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: vba

Keywords: kbbug kbnofix KB210582

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.