Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] deb_dolittle@yahoo.com is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing templates on the network [email protected] Microsoft Word Help 1 May 20th 06 12:56 AM
Saving Templates and Macros Word XP ALEX-BEL New Users 1 February 23rd 06 02:48 PM
Saving templates as .doc files Per Microsoft Word Help 3 January 9th 06 08:25 AM
NOT Saving Templates Bob M Microsoft Word Help 3 March 9th 05 05:01 PM
Templates in too many languages. Only need English. capt_dalton Microsoft Word Help 0 December 2nd 04 10:29 PM


All times are GMT +1. The time now is 05:10 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"