Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA open template (2003 SP2)

    I am familiar with the Workbooks.Add Template:="[path and template name]" command.
    But what if you don't know the default path of the templates? Is there some way to determine this? I know that the only place you can change the path of the templates is in Word, so if I wanted code to open a template in Excel, and I move to another computer which has the same template but possibly in another folder, how can I access this via VBA? Is it even possible? It would be safe to assume that Word is on both computers if this helps.
    Thanks for your help.

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

    Re: VBA open template (2003 SP2)

    Application.TemplatesPath returns the user templates path, and Application.NetworkTemplatesPath the workgroup templates path (both with a trailing backslash).

    PS Were the replies to <post:=643,456>post 643,456</post:> helpful?

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA open template (2003 SP2)

    Thanks Hans, works great.

    And yes, your posts to the other issue also worked great. Much appreciated.

Posting Permissions

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