Re: How to prohibit saving a file in Word 97?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jay Freedman (jay.freedman_at_verizon.net)
Date: 02/24/05


Date: Thu, 24 Feb 2005 16:12:19 -0500

On Thu, 24 Feb 2005 08:59:07 -0800, NTO
<NTO@discussions.microsoft.com> wrote:

>I have a custom template in Word 97 that generates a word document. I want
>the user to be able to save the document once it's produced, but I don't want
>the user to be able to save the template on a disk, hard drive, etc. Can
>anyone help? Also, if this can be done in Word 97, if user loads up the
>template into a later version of Word, will the "save limitation" established
>function the same?

In that template, create macros named FileSave, FileSaveAs, and
FileSaveAll, as described in
http://www.word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm. These
macros can be empty (do nothing), or you can put in a MsgBox saying
that saving is prohibited. You'll also need the AutoClose macro
mentioned there, to intercept the closing of the document; in that
macro, set ActiveDocument.Saved = True so Word thinks the document
doesn't need to be saved before closing.

These methods will continue to work in later versions of Word.

All of this is easy to bypass, though, by setting the security level
to High so that all macros are disabled. There's really nothing you
can do about that.

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org


Relevant Pages

  • Re: Templates and Macros
    ... including AutoText, AutoCorrect, keyboard assignments, toolbars, macros, ... Here is some general info on moving from Word Perfect to Word: ... As for converting documents from Word Perfect to _use_ in Word... ... this new document as a Word template. ...
    (microsoft.public.word.docmanagement)
  • Re: Catching document save event
    ... template the same name as the built-in Word commands. ... In the 'Macros in' dropdown, ... From the list, select 'FileSave'. ...
    (microsoft.public.word.vba.general)
  • Re: Understanding Macros
    ... I'm assuming you put the VBA macro code into your forms template. ... Choose an appropriate name for the toolbar ... list, find Macros. ... Okay, I deleted the "Option Explicit" line, ran again. ...
    (microsoft.public.word.docmanagement)
  • Re: Understanding Macros
    ... followed all of your responses and my spell check is working in my template. ... Choose an appropriate name for the toolbar ... list, find Macros. ... OK, for the moment, just delete the line that says "Option Explicit". ...
    (microsoft.public.word.docmanagement)
  • Re: Preventing macro from copying over from template to document
    ... Then the document will be attached to Normal.dot, not to the template. ... and create a routine in it called FileSave Put the ... Thats got rid of the Enable Macros dialog, ... a sub, etc. ...
    (microsoft.public.word.vba.general)