Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close global template (Word2000/2003)

    A global template is saved using the following code:
    ActiveDocument.SaveAs FileName:=Options.DefaultFilePath(wdStartupPath) _
    & "Research paper template.dot", FileFormat:=wdFormatTemplate

    What code would I use to
    1: close this template
    2: delete this template

    The reason for this would be when the global template is updated to include new features.

    Regards

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Close global template (Word2000/2003)

    To close a global template you first have to uninstall and/or delete it from the add-ins collection. This is from something I wrote a few years ago:
    <pre>Dim VersionToKill As String, UserStartUpPath As String
    UserStartUpPath = Options.DefaultFilePath(wdStartupPath)
    VersionToKill = templatename.dot
    Dim aTemp As Template
    For Each aTemp In Templates
    'remove old template from add-ins and startup path
    If aTemp.FullName = UserStartUpPath & "" & VersionToKill Then
    AddIns(UserStartUpPath & "" & VersionToKill).Installed = False
    AddIns(UserStartUpPath & "" & VersionToKill).Delete
    Kill UserStartUpPath & "" & VersionToKill
    End If
    Next
    </pre>

    Hope this helps.

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Close global template (Word2000/2003)

    Thanks - put me on the right path.
    Regards

Posting Permissions

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