Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Document Template (2007 and 2003)

    I receive some documents from my colleagues. The problem is that when is opening the file in word is taking a lot of time to connect to the server where is located the template.dot file of the document.
    How can i solve this problem before opening the document? or open and remove something?
    Please i need your advice.

    all the best
    Marius

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

    Re: Document Template (2007 and 2003)

    You'll have to open the document once.
    In Word 2003, select Tools | Templates and Add-Ins..., and in Word 2007, activate the Developer tab of the ribbon, then click Document Template.
    You can specify a different template, for example Normal.dot (for Word 2003) or Normal.dotm (for Word 2007) in the Document Template box, or click Attach... to select a template.

  3. #3
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Document Template (2007 and 2003)

    Dear Hans,

    Thanks for quick answer, but I was wandering for other solution to change automatically all the documents in a folder if is possible.

    all the best,
    Marius

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

    Re: Document Template (2007 and 2003)

    There is no way to change the template without opening the documents.

    You could create a macro that loops through the documents in a folder, opens each in turn, sets the template, then saves and closes the document.

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,853
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Document Template (2007 and 2003)

    If you know the name of the attached template is the same for all the documents then put a local copy of that template (or one with the same name) in your User Templates directory.

    In my experience, Word will find this one before looking for the template specified in the file path.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Document Template (2007 and 2003)

    Yes, Hans is right. The other solution is not working for me? I use office 2007, i put the files in the proper location and no luck.
    Maybe you Hans can help me with the macro?

    all the best,
    Marius

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

    Re: Document Template (2007 and 2003)

    Create a copy of the folder with the documents before trying the following code, and check the results carefully after running it.
    <code>
    Sub ChangeTemplateInFolder()
    ' Modify as needed, but keep the trailing backslash
    Const strFolder = "C:Test"
    Dim strFile As String
    Dim doc As Document
    Application.ScreenUpdating = False
    strFile = Dir(strFolder & "*.doc")
    Do While Not strFile = ""
    Set doc = Documents.Open(strFolder & strFile)
    doc.AttachedTemplate = NormalTemplate
    doc.Close SaveChanges:=True
    strFile = Dir
    Loop
    Application.ScreenUpdating = True
    End Sub
    </code>
    Since each document has to be opened, this macro may take a long time to run to completion.

  8. #8
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Document Template (2007 and 2003)

    Great, is perfect, I have to unplug the network connection before doing this.

    thanks again,
    Marius

Posting Permissions

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