Help on trapping for wdDialogFileSaveAs?

A

Armey

Hi, i was working on a recent problem with trapping on printing events
in a protected template and realized I had a similar need for password
protecting the save, save as, save as web page options in MS Word
2003. I repurposed my printing code for my traps on saving (see
below). I have figured out how to trap for the save icon, the file
save, the file save as, but I cant figure out how to trap for the file
save as web command. Any thoughts?

Public Sub FileSave()
Dim SaveRet As Long
Dim Reply1 As String
Reply1 = InputBox("Save Password", "Saving is restricted, enter
your password", " ")
If Reply1 = pwFileSave Then
SaveRet = Dialogs(wdDialogFileSaveAs).Show
End If
End Sub

Sub FileSaveAs()
FileSave
End Sub

Sub FileSaveAll()
FileSave
End Sub
 
D

Doug Robbins - Word MVP

Some of these won't be applicable to Word 2003, but in 2007 the commands
that you would need to trap are:

FileSave
FileSaveAll
FileSaveAs
FileSaveAsOtherFormats
FileSaveAsWebPage - Probably the one you want
FileSaveFrameAs
FileSaveHTML - You may also need this
FileSaveWord11
FileSaveWordDocx
FileSaveWordDotx

You won't nee the last 2

You can get the names of all of these that are applicable by selecting "Word
commands" from the "Macros in:" pull down in the Macros Dialog.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
A

Armey

Some of these won't be applicable to Word 2003, but in 2007 the commands
that you would need to trap are:

FileSave
FileSaveAll
FileSaveAs
FileSaveAsOtherFormats
FileSaveAsWebPage - Probably the one you want
FileSaveFrameAs
FileSaveHTML - You may also need this
FileSaveWord11
FileSaveWordDocx
FileSaveWordDotx

You won't nee the last 2

You can get the names of all of these that are applicable by selecting "Word
commands" from the "Macros in:" pull down in the Macros Dialog.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP









- Show quoted text -

Doug, you are the man... thank you very much. I am glad that you
pointed out the 2007 versions since some of the users may be using
this version. Thank you.
 
A

Armey

Some of these won't be applicable to Word 2003, but in 2007 the commands
that you would need to trap are:

FileSave
FileSaveAll
FileSaveAs
FileSaveAsOtherFormats
FileSaveAsWebPage - Probably the one you want
FileSaveFrameAs
FileSaveHTML - You may also need this
FileSaveWord11
FileSaveWordDocx
FileSaveWordDotx

You won't nee the last 2

You can get the names of all of these that are applicable by selecting "Word
commands" from the "Macros in:" pull down in the Macros Dialog.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP









- Show quoted text -

Doug, I did have another question about the wdDialogFileSaveAs
Dialog. When I implement my code above and the user tries to save
their document, and not do a save as, obviously using this dialog they
can only perform the save as, and not a traditional save function. Is
there any way to accomplish my goal of protecting the savie function
and not use the wdDialogFileSaveAs for the traditional save? In
short, my FileSave() Sub works as designed for everyting except the
regular file save since it calls that dialog. Any help or thoughts is
appreciated.
 

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