Cannot Print to Status Bar When Closing a Dialog Box

Last reviewed: February 5, 1998
Article ID: Q123300
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c

SYMPTOMS

When you use the Print command in code in response to a button click that closes a dialog box, the text in the status bar may flash by too quickly to be seen.

CAUSE

Closing the dialog box resets the status bar.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Word versions 6.0, 6.0a, and 6.0c for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The following sample macro demonstrates the behavior described in the "Symptoms" section above.

WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

   Sub MAIN
   Begin Dialog UserDialog 109, 81, "Test", .DialogFunction
      OKButton 10, 6, 88, 21
      CancelButton 10, 30, 88, 21
      PushButton 10, 54, 88, 21, "Text"
   End Dialog

   Dim dlg As UserDialog
   x = Dialog(dlg)

   End Sub

   Function DialogFunction(identifier$, action, wvalue)
      Select Case action
         Case 1
         Case 2
            If identifier$ = "Text" Then
               DialogFunction = 1
               Print "Button pressed"
            Else
               Print "This is the text that will not be seen"
               DialogFunction = 0
            End If
         Case  3
         Case  4
         Case  5
         Case Else
      End Select
   End Function


KBCategory: kbprg buglist6.0 buglist6.0a buglist6.0c
KBSubcategory: kbmacroexample
Additional reference words: 6.0 6.0a 6.0c functions dynamic statement
word6 winword
Keywords : kbmacroexample
Version : 6.0 6.0a 6.0c
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.