How to prohibit saving a file in Word 97?

N

NTO

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?
 
J

Jay Freedman

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

NTO

Thanks Jay. Would your answer be the same if the file was not in template
form, but rather in a standard .doc form?
 
J

Jay Freedman

Yes, the answer is basically the same except that macros in documents
are guaranteed to trigger the macro warning on opening, while those in
properly installed (or digitally signed) templates won't.
 

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