save button Word 2003

  • Thread starter Peter Faulhaber
  • Start date
P

Peter Faulhaber

Hello all,

Which macro is triggered when I click the save button (or file, Save or
CTRL+S)?
I know the AutoOpen and AutoNew. Is there something like that for Save?
 
F

fumei via OfficeKB.com

Specifically, the Save button, Ctl-S and File > Save fires the Word Sub
FileSave command.

Sub FileSave()
MsgBox "Trying to save. Not going to"
End Sub

in a document would override the command (for THAT document). Only the
messagebox would display. The file would NOT be saved.

Sub FileSave()
ActiveDocument.SaveAs Filename:="c:\yadda\NewFile.doc"
End Sub

would make the Save command do a SaveAs with the named filename.

Sub FileSave()
ActiveDocument.Close wdDoNotSaveChanges
End Sub

would make the Save command close the document, without saving any changes.
 

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