View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Is it possible to disable print function for Word Templates?

Most of what you ask for can be accomplished with macros. The key idea
is that there are specific macro names that cause the macro to run
instead of the corresponding built-in command. This is explained in
http://www.word.mvps.org/FAQs/Macros...tSavePrint.htm.

Further, if the macro is in a template on which a document is based,
rather than in Normal.dot, it's specific to that template. So each
template can have its own FileSave macro, for example, that will run
only when the current document is based on that template. Each one can
contain a different folder name for saving the document.

You can disable printing of documents based on selected templates by
putting into those templates a pair of macros named FilePrint and
FilePrintDefault that have no code inside them -- so they run and do
nothing. This won't stop someone who's determined to print a copy, but
it will serve as a reminder that "hey, this document isn't supposed to
be printed".

It's easy to make up the document name from the template name and the
date/time. (See http://word.mvps.org/faqs/macrosvba/SetDefFilename.htm
for one way to do this.) You can also use entered data from the
document, but how you do that depends on where the data is -- inside a
bookmark, in a form field, in a table, etc.

If you have further questions about this, please post in the newsgroup
microsoft.public.word.vba.beginners
(http://www.microsoft.com/communities...lang=en&cr=us).

--
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.

On Mon, 2 Oct 2006 16:05:01 -0700, Tom
wrote:

We have many MS Word templates that the Call Center Agents use for
correspondence with our customers. For these templates, we would like to
know...

1. Whether we can disable the print functionality. This functionality should
be disabled only for the selected templates and should be available for all
other Word documents.

2. Based on the template chosen, when the user hits the save button, it
should save in the designated folder. The designated folders are different
for different templates.

3. I am not sure whether it can be done, is it possible to auto-populate
the name of the file (with template name + some data points that the user has
entered in the template + Current date and time when it is saved.)