How can I disable Save and Close in MS Word

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johnmburgess
    New Member
    • Jul 2006
    • 4

    How can I disable Save and Close in MS Word

    I have created an application which will open a Word template and merge data from a file to produce a letter (for instance). Extar text can then be added by a user.
    The final document will be printed and saved in a database.
    I need to prevent the users from saving the document themselves or from closing the Word application until my application has saved the file to the appropriate place. Can anybody help? :confused:
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi John,

    am not exactly sure if you be able to do that from VB.. well.. lets see if anyone have done that before.. just hang on buddy.. help might be on it's way.. take care..

    Comment

    • BSOB
      New Member
      • Jul 2006
      • 77

      #3
      why dont you ask vb to close the document as soon as it is done saving it, and then say "no, i dont want to save!"

      Comment

      • johnmburgess
        New Member
        • Jul 2006
        • 4

        #4
        The problem is that users will sometimes need to enter additional text and will then click on Save and Close rather than returning to the application to complete the task.
        The App saves the document and closes word with no problem but unfortunately the whole process falls down when we introduce it to our users.

        Comment

        • BSOB
          New Member
          • Jul 2006
          • 77

          #5
          could you use vb to capture the location that the document was saved to and, when it is saved and closed improperly by the user, import the document from disk to database? and then delete the file created by the user saving it to disk?
          that would make word's save/close the same as your application's save/close.
          i know it isnt pretty.

          Comment

          • johnmburgess
            New Member
            • Jul 2006
            • 4

            #6
            Yes, that is probably the only way to achieve what I am after. I looked for info on using Event Handlers with Word - specifically reacting to Save and Close but had no luck.

            Comment

            Working...