|
-
Oct 4th, 2005, 02:41 AM
#1
Thread Starter
Lively Member
How to reference Normal.dot?
I'm writing a macro which copies a style (Default Paragraph Font) from the users Normal.dot template file. At the moment it's hard-coded to point it to my own template, but how can I edit this so it will use the normal template of whoever runs the macro?
VB Code:
Dim Dest As String
Dim Norm As Template
Dest = ActiveDocument.Path & "\" & ActiveDocument.Name
'add DPF
If Not StyleExists("Default Paragraph Font") Then
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\pickarooney\Application Data\Microsoft\Templates\Normal.dot" _
, Destination:=Dest, Name:="Default Paragraph Font", Object:=wdOrganizerObjectStyles
End If
-
Oct 4th, 2005, 11:43 AM
#2
Re: How to reference Normal.dot?
Think you need api's to return the "application data" path for each user,
found this link though, - http://www.thescarms.com/vbasic/specialfolders.asp
you can download the source code too, so it may help !!!
-
Oct 4th, 2005, 12:50 PM
#3
Re: How to reference Normal.dot?
Hi,
If you're in VBA:
VB Code:
strPath = Options.DefaultFilePath(wdUserTemplatesPath)
will get you the path.
zaza
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|