Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I disable the "Save" on Word, Excel etc and use VB instead?

Status
Not open for further replies.

MILLER09

IS-IT--Management
Nov 19, 2003
9
AU
I'm new to VB and need help. My problem is this:
1. I save a document in any MS Office product (let's say word to make it easier) using File>Save As
2. I open the document several days (weeks/moths etc) later and need to start a VB script instead when the File>Save button is clicked

Is there a way to disable the default option for Save (i.e. save using same pathname, path, document extensions etc) and automate the whole "Save" process with some bells and whistle's of my own?

Cheers,

neuralSea


 
Sorry I don't have some sample code to post for you, but look up the CommandBars and CommandBar objects in help. To do what you are suggesting would take steps similar to the following:

1. Create custom CommandBar button (maybe copy from the current button - I'm not sure)

2. Insert it before BuiltIn button

3. Hide BuiltIn button

4. Write your code to respond to the Click event

Hope this at least gets you started. Good Luck!

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top