Is it possible to disable print function for Word Templates?

G

Guest

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

Jay Freedman

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/MacrosVBA/InterceptSavePrint.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/communitie...3e4-379a-4ba1-aade-bee89d80f3ec&lang=en&cr=us).

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top