Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How can you tell when Save button pressed (word97 sr2b)

    In a newly created word document ie a doc that hasnt been saved yet with a filename
    - is there a way to determine when the user clicks on the save button (on the Standard toolbar)?
    TIA - Diana

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How can you tell when Save button pressed (word97 sr2b)

    What exactly are you trying to do?

    You can "hijack" the FileSave command, and make your own code run, if that's what you are asking for.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How can you tell when Save button pressed (word97 sr2b)

    HI Bryan -thats exactly what I want to do.
    in a new doc(template) that hasnt been saved yet with file name
    when the user clicks on the Save button - I want my own code to run
    So how can you determine when user presses the save button - are theyre parameters you can obtain?
    How do you 'hijack' the Save command?
    Diana

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How can you tell when Save button pressed (word97 sr2b)

    Diana,

    To hijack the Save command, and this hijack the save command EVERY SINGLE TIME the file is saved, not just the first time. All you need to do is create a sub called FileSave:

    <pre>Sub FileSave()
    Msgbox "Save Is now Hijacked"
    End Sub</pre>


    This will also hijack CTRL+S and the File|Save menu Item.

    If you want to capture the Save As command, you will need a sub called FileSaveAs

    <pre>Sub FileSaveAs()
    Msgbox "Save As Is now Hijacked"
    End Sub</pre>

    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •