PDA

View Full Version : Solved: Toolbar when Word starts



Charlize
06-21-2007, 12:08 PM
I've created a toolbar in a document with several printers on that have specific printing options. I want this toolbar to open when Word opens and remains available until Word closes. I want to use this on a network. Any hints and/or tips are welcome.

It works when you open the document but I want that toolbar on every Word session.

Thanks in advance.

lucas
06-21-2007, 12:27 PM
Save it as a template....dot file extention and save it to a folder on the network...open word on each maching and set the workgroup templates folder for that location on the network...I think it will load each time.

If not you will have to change the startup folder for word.

all found at Tools-Options File locations tab

Charlize
06-21-2007, 03:45 PM
Well, the macro's are loaded but I wanted that the routine create_menu could be called whenever Word is openend. For now I have created a button referenced to the create_menu routine to create the menu.

I can live with that. In the morning push button and presto, with a click of a mouse I can print whatever template to the wright papertrays without need to manually switching the settings in the printer by using the printmenu.

fumei
06-22-2007, 01:02 PM
For anything to work when Word is opened it has to in a global template. Either normal.dot, or a template (.DOT) file that is in the Startup folder.

There are two Startup folders. One for the username session, and one for the machine session.

Username session Startup is Document and Settings/username/Application Data/yaddaydda/Startup.

Machine session is Program Files/Office/yaddayadda/Startup.

That is it. There is no other way to get an procedure to execute on Word startup. There IS a way for a specific file opening, using Document_Open.

Putting a template into the Workgroup folder will NOT make it load on Startup. It will make it available, not it will not load it.

I am assuming each machine has its own normal.dot. You COULD go to each machine and either:

A - copy the global template into that machine Startup folder;

B - edit each machine normal.dot to load the global.

NOTE: the global does NOT have to be in either the User template folder, OR the Workgroup folder. It can be in any folder, anywhere.AddIns("FULL path to global template" _
).Installed = True
If you put that in the Document_Open event of Normal.dot, then opening a document will load the template, and all its code (and toolbars) will be available.

Note: this will not work for any NEW documents created from Normal. Therefore it has to be also put in Document_New() of normal.dot.

Final note: you may want to unload this on demand. The code for doing this is: AddIns( _
"FULL path to global template" _
).Delete

Charlize
06-24-2007, 03:38 PM
Thanks for the extra info lucas and fumei.