Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Saving a templage before exit or close (2000)

    There was a thread that suggested, a template can be saved automatically by doing this

    NormalTemplate.Save = True

    It seems like this one works fine, about if the templage name is made of 2 word for example "Normal Test"

    I do have a templage that is made of 2 word. I do have the following macro inside the template: an AutoOpen, AutoClose, AutoNew, and AutoClose. Everytime I finish a document in the tempate, it asked me if I want to save the templage. I want to get rid of the saving message. I put these codes in the above macros, but did nto work.

    Dim TestTemplate As Template
    TestTemplate.Name = "Normal Test.Dot"
    TestTemplate.Save =True

    I received the error from the second line. All that I want to do, get the template to save automatically.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving a templage before exit or close (2000)

    The Name property of a template is read-only.
    You can refer to the template attached to a document using the AttachedTemplate property.

    So you can write code like this:

    ActiveDocument.AttachedTemplate.Saved = True

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving a templage before exit or close (2000)

    Thank you, I will try it out

  4. #4
    Star Lounger
    Join Date
    Apr 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving a templage before exit or close (2000)

    It seems like before Word exits a template, it closes it first. It did not do any effect until I added it to the autoclose. So, currently is working fine.

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •