Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Controlling saving templates
I created a Word form template (Version 2003 on an XP, if that
mattters) that will be used by sevaral members in my company. It has a fill in fields only protection.When I go to the directory that the template is in and double click the template, it opens up as a document and any changes get saved as a document. This is good. But should a user open the template from the file menu within Word and fill it out and save it, it saves it as a template. Not good. Is there anyway I can prevent the template itself from getting saved when the protection is on, no matter how it is opened up? I have little control how the user opens the template. Thanks Debbie |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Controlling saving templates
Put this macro into your template
(http://www.gmayor.com/installing_macro.htm). Sub AutoOpen() Dim msg As String If ActiveDocument.Type = wdTypeTemplate Then msg = "You have opened the template" & vbCr msg = msg & ActiveDocument.Name & vbCr msg = msg & "instead of creating a new document " msg = msg & "based on the template." & vbCr & vbCr msg = msg & "If you really want to edit the " msg = msg & "template itself, hold down the " msg = msg & "Shift key while opening it." MsgBox msg, vbCritical + vbOKOnly, "WARNING!" ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges End If End Sub If anyone opens the template itself, they'll see the message box, and then the template will close itself. If they use the File New menu item or just double-click the template's icon to get a new document, the If statement's condition will be false and the document will behave normally. If you follow the instructions and hold down the Shift key while opening the template, that prevents the auto macro from running. Then you can -- intentionally -- modify the template. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. wrote: I created a Word form template (Version 2003 on an XP, if that mattters) that will be used by sevaral members in my company. It has a fill in fields only protection.When I go to the directory that the template is in and double click the template, it opens up as a document and any changes get saved as a document. This is good. But should a user open the template from the file menu within Word and fill it out and save it, it saves it as a template. Not good. Is there anyway I can prevent the template itself from getting saved when the protection is on, no matter how it is opened up? I have little control how the user opens the template. Thanks Debbie |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sharing templates on the network | Microsoft Word Help | |||
Saving Templates and Macros Word XP | New Users | |||
Saving templates as .doc files | Microsoft Word Help | |||
NOT Saving Templates | Microsoft Word Help | |||
Templates in too many languages. Only need English. | Microsoft Word Help |