How to turn off file save as in Word?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an application in Access that creates Word documents. I don't want
the users to know where the files are kept or to be able to do a Save As.
Doing a Save A lets them into the folder.

Obviously, I only want this to happen when my application creates the
document and not for general usage of Word.

many thanks
george
 
If you let the users see the documents at all, then you can't actually stop
them. You can discourage them by removing or trapping the SaveAs
instruction -- you'd need to catch Open as well, since that will also reveal
the save folder. However this approach to document security is usually not
worth the trouble, since it doesn't really provide any security anyway.
Users can get around it, amongst other methods, by --

-- switching to VBA and typing ? ActiveDocument.Fullname in the immediate
window.
-- calling the FileSaveAs directly, command using the Tools > Macro > Word
Commands list.
-- killing your Access app using the Task Manager after the document is
created.
-- writing their own macro to SaveAs
-- adding a { FILENAME \p } field to the document
-- in W2003, closing the document then holding the mouse over the filename
in the Getting Started task pane
 
Thank you Jezebel

You have given me some food for thoughts. However, if I can trap the Save
As and Open for now, I prevent about 99% of the population. One can never
stop those who are determined.

What is the best way to trap Open and Save As in Word?
 
As with pretty well all Word commands, you trap them by writing macros of
the same name: FileSaveAs and FileOpen, in this case.
 
You are going to have to trap this in the document template (which therefore
cannot be normal.dot) or many users will switch off the macros at the
security prompt that will occur if the macros are in the document. Frankly,
I don't think this will work as effectively in practice as you hope. Though
the mechanisms Jezebel describes are perfectly valid.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
GeorgeMar said:
I have an application in Access that creates Word documents. I don't want
the users to know where the files are kept or to be able to do a Save As.
Doing a Save A lets them into the folder.

Obviously, I only want this to happen when my application creates the
document and not for general usage of Word.

I would suggest a different approach. If you don't want tusers to know where
your doicuments are stored, don't display the stored document. Instead,
create a new blank document and user the insertFile method to insert your
pre-stroed document into it. If you want to display some meaningful name in
the caption of the document editing window, you can do that by setting the
Caption property of the ActiveWindow object. If the user then decides to
save the displayed document, they are saving an entirely new document,
defaulting to the My Documents folder for a place to store it.
 
Back
Top