none
Functions moving too fast for Bookmark Update? RRS feed

  • Question

  • The following is part of the code that I am using in a Word Document. The bookmarks are running fine with the exception that the document on the screen is only being updated after the two Confirmation MsgBoxs. I've moved the MsgBox code to a separate sub to be called after the Bookmarks are completed, or so I thought. The bookmarks were only updated after the subs ran. I want uses to see the updated labels before they are asked to print or quit. I haven't done much VBA. Any ideas are appreciated.

       UpdateBookmark "expDate1", expDate
       UpdateBookmark "expDate2", expDate
       UpdateBookmark "expDate3", expDate
       UpdateBookmark "expDate4", expDate
       UpdateBookmark "expDate5", expDate
       UpdateBookmark "expDate6", expDate
       UpdateBookmark "expDate7", expDate
       UpdateBookmark "expDate8", expDate
       UpdateBookmark "expDate9", expDate
     

       If MsgBox("Would you like to print the document?", vbYesNo) = vbYes Then
          Dialogs(wdDialogFilePrint).Show
          If MsgBox("Would you like to print another set of labels?", vbYesNo) = vbYes Then
            docName = ActiveDocument.Name
            docPath = ActiveDocument.Path
            Documents.Open (docPath + "\" + docName)
            Document_Open  

      Else
          QuitWord  

      End If


    Mark Forsberg

    Monday, August 12, 2013 11:01 PM

All replies