Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Apr 2002
    Location
    Sydney, Australia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Save global template changes (Word XP)

    I have a global addin template that includes a custom toolbar. Some buttons on this toolbar apply to numbering.

    I have another template with VBA code that allows an end user to change the style of the numbering scheme within the document. This code dynamically changes the buttons on the toolbar.

    All is good until the user exits Word. Word will prompt the user to save the global addin. How can I avoid this? I know that I can use:

    ActiveDocument.AttachedTemplate.Saved = True/False

    if the toolbar changes were in the active template. But I can't seem to force the save to the global.

    Cathy

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

    Re: Save global template changes (Word XP)

    Try something like this:

    Dim tmp As Template
    For Each tmp In Templates
    If tmp.Name = "TaskPaneController.dot" Then
    tmp.Saved = True
    Exit For
    End If
    Next tmp

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save global template changes (Word XP)

    Hi Cathy

    I've had the exact same problem some while ago and Hans' answer should do the trick, provided that your global template is stored in the User or Workgroup templates folders. If not it will be a good idea to use a fully qualified path as well.
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

Posting Permissions

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