• Template Question (Word XP)

    • This topic has 3 replies, 2 voices, and was last updated 22 years ago.
    Author
    Topic
    #385690

    I have a template saved in the template directory, under a subfolder. When I use the template to create a document, save and close WORD, I am asked if I want to “save changes to template ‘xyz’?

    How can I prevent this question from being popping up? ( I have the files saved as ‘read only’)

    Viewing 0 reply threads
    Author
    Replies
    • #666184

      1. Remove the code that makes a change to the template (good luck).
      2. Add a line of code that tells Word that the template is not “dirty”; therefore,
      the prompt is avoided.

      Since you have a VBA6 host you can put the code in one of the app events like
      DocumentBeforeClose

      The line of code:

      activedocument.attachedtemplate.saved = true

      or the slightly more elegant:

      thisdocument.saved = true

      • #666280

        So ,

        Private Sub Document_Close()
        ThisDocument.Saved = True

        End Sub

        would close the document and bypass this questioning?

        As far as “removing the code that changed it”…. I don’t even know what it’s considering a change. I can create a document, based on the template, type NOTHiNG, do NOTHING… close the document and I’ll be asked to save changes to the template.

        • #666284

          I shouldn’t have tried this from memory. Sorry.

          Here’s a post that should help: post 116985

          If you need more info, do a search on

          thisdocument.attachedtemplate.saved = true

    Viewing 0 reply threads
    Reply To: Template Question (Word XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: