Hi there,
You'll need to install a macro in the user's Normal template, or in a Global Add-in to Word - depending on the user's setup (personally I use an Add-In in the user's start-up path - see Tools > Options > File Locations)
Any macro that has the same name as a Word command will override the Word command. You need macros named "Save", "Save As", and "Save All".
Write the macros with VBA and store them in a template. If you use the user's Normal template, you can have the macro save to different locations per user. But you need to be aware that users break their Normal.dot templates regularly, and when they do, your macro will go away.
Better to use an Add-In. An add-in is simply a template that has been installed as an Add-In. This template can be a single file for all users, mounted on the network. It can also be read-only (a Normal Template must never be read-only, and must never be shared).
To get the add-in installed you need to place your code within a templates (add-in) and install it to the user's Word start-up location (as I mentioned before). You can change this locaiton to be a network location which works fine, but I prefer to have a system where by the template is replciated to the user's local machine to avoid corruption or access of the master copy by unauthorised users.
You code will be some thing like:
Sub Save()
'enter code here
End sub
Note that this code will override the actual word save command so you will need to add this into your custom code!
Hope this helps
Squarecat
|