Forum Discussion
Word Templates Opening Multiple Times
To work around this, you might try explicitly attaching the template after document creation using the AttachTemplate method, or consider setting the template's path as a full UNC path with proper permissions.
Well, some progress anyway. Thanks a bunch for the suggestion of the full path. We have various mapped network drives, and while it didn't need to be a UNC path, using a path with a mapped network drive made the Read Only message go away. Though, admittedly, I don't really understand why.
With a new document opened already and attached to MyTemplate.dotm the code generating the read only message was this:
With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = "MyTemplate.dotm"
End WithThe read only message went away with this code:
With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = Application.Options.DefaultFilePath(wdWorkgroupTemplatesPath) & "\MyTemplate.dotm"
End WithI would have thought these two to be the same as the first one would try the default templates folder then look in the "Workgroups templates" folder in Options > Advanced > File Locations. But apparently not.
I have thus far been unable to make two copies of the template open like I've seen before. Maybe something on my system has changed since my last testing. If I find anything on that, I'll post back.
Thanks again