Path where templates are stored

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Path where templates are stored

Post by Robie »

Is it possible to find out the default path where the PP templates are stored? In Word, I can look up Options|File Locations | etc. There is no such thing in PP 2003 (haven't checked 2007 yet).

When try to create a new template, it certainly comes up with all the templates stored in the correct place for the company. It's this path I need. I am trying to store an image in it.
pp_defaultfolder.png
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Path where templates are stored

Post by HansV »

All Office applications use the same two folders for templates (the user templates folder and the workgroup templates folder), but Word is the only one that lets you view and change their locations. If you change the user templates folder or workgroup templates folder in Word, it will affect all other Office applications too.
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Path where templates are stored

Post by Robie »

HansV wrote:All Office applications use the same two folders for templates (the user templates folder and the workgroup templates folder), but Word is the only one that lets you view and change their locations. If you change the user templates folder or workgroup templates folder in Word, it will affect all other Office applications too.
Thanks. Consistent interface would have been so helpful.

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Path where templates are stored

Post by HansV »

Robie wrote:Consistent interface would have been so helpful.
What a novel idea! :grin:
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Path where templates are stored

Post by Robie »

HansV wrote:
Robie wrote:Consistent interface would have been so helpful.
What a novel idea! :grin:
Do you know a way of getting hold of it in PP?

User avatar
StuartR
Administrator
Posts: 12604
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Path where templates are stored

Post by StuartR »

Robie wrote:Do you know a way of getting hold of it in PP?
By automating a hidden copy of Word?
StuartR


Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Path where templates are stored

Post by Robie »

StuartR wrote:
Robie wrote:Do you know a way of getting hold of it in PP?
By automating a hidden copy of Word?
Dumb question. How can I open a word document from PP? I know I can do new presentation but can't find a way of doing it with Word.

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Path where templates are stored

Post by HansV »

You don't have to open a document, just start Word:

Code: Select all

Sub Test()
  Dim objWord As Object
  Dim strUserTemplates As String
  Dim strWorkgroupTemplates As String
  Set objWord = CreateObject("Word.Application")
  strUserTemplates = objWord.Options.DefaultFilePath(2) ' wdUserTemplatesPath
  strWorkgroupTemplates = objWord.Options.DefaultFilePath(3) ' wdWorkgroupTemplatesPath
  objWord.Quit SaveChanges:=False
  Set objWord = Nothing
End Sub
You'd have to do something with strUserTemplates or strWorkgroupTemplates of course.
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Path where templates are stored

Post by Robie »

HansV wrote:You don't have to open a document, just start Word:

Code: Select all

Sub Test()
  Dim objWord As Object
  Dim strUserTemplates As String
  Dim strWorkgroupTemplates As String
  Set objWord = CreateObject("Word.Application")
  strUserTemplates = objWord.Options.DefaultFilePath(2) ' wdUserTemplatesPath
  strWorkgroupTemplates = objWord.Options.DefaultFilePath(3) ' wdWorkgroupTemplatesPath
  objWord.Quit SaveChanges:=False
  Set objWord = Nothing
End Sub
You'd have to do something with strUserTemplates or strWorkgroupTemplates of course.
That works beautifully Hans. Thank you.

Sorry, another totally stupid question (I should know this as I have used it before but my mind is just not working properly). How can I test a variable for 'Nothing'?

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Path where templates are stored

Post by HansV »

"Nothing" only applies to object variables (the kind you assign a value with the keyword Set). To test for Nothing, use

If variable Is Nothing Then
Best wishes,
Hans