Controling the saving of a document

D

Dom

I want be able to open a new document in VB from a clients record, then when
the select save, I want to be able to run my own bit of code to save it to a
specified location, then updtae the clients record in the database with the
path, name, title etc of the letter. I have got it to open word inside of a
frame, then make the save as menu iption invisible, and to rename the Save
butto to Save to client, but what I want to do is set the .OnAction to point
to some code (preferabbly not a macro as I have to distribue it easily).

this is what I have so far

With mwrdApp.CommandBars.ActiveMenuBar
.Controls("&File").Controls("&Save").Caption = "&Save to client"
.Controls("&File").Controls("&Save").OnAction = "xxxxx" 'This is
where I am stuck
End With
 
J

Jezebel

You've got no choice but a macro at that point: either the code you want to
run, or some code that calls the code you want to run.

But simpler than screwing around with the menus, write a macro called
FileSave: that will run automatically in place of the built-in command. Then
you don't need to touch the menu system at all. And believe me, that is
*really* worth avoiding! If you think distributing a macro is a problem,
just wait for the feedback when you interfere with people's menus ...
 

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