Opening a document and hiding it.

W

Wassim

Hello All

How does one open a MS-Word 97 and > document and as soom as the user
Hits the Enable Macros, run the code in the AutoOpen sub and then hide
the document.

I have a document that has some macros but all the user needs to do is
interact with a floating Toolbar.

The document is blank, so there is no need to have it display at all
after the Toolbar is produced.

Is it easy to remove it from Windows Taskbar as well?

Thanks
 
C

Chad DeMeyer

Wassim,

When you have macros, keyboard customizations, and/or toolbar customizations
that you want to make available to a user, but no actual document content,
the standard approach is to save the document as a template and distribute
it as an add-in. If the add-in is stored in Word's startup location, it
will automatically be loaded when Word is started. If the user has the
option set to 'Automatically trust all installed templates and add-ins',
they won't even be prompted to enable macros. If you need to execute code
when the add-in loads, use an AutoExec macro. For more info, see the
following articles:

Word Document Templates vs. Word Add-ins (Global Templates)
http://msdn.microsoft.com/library/d...umenttemplatesvswordaddinsglobaltemplates.asp

Creating a Word Add-in
http://msdn.microsoft.com/library/d...en-us/modcore/html/deovrcreatingwordaddin.asp

Deploying Application-Specific Add-ins
http://msdn.microsoft.com/library/d...l/deovrdeployingapplicationspecificaddins.asp

Running Code when a Word Add-in Is Loaded or Unloaded
http://msdn.microsoft.com/library/d...unningcodewhenwordaddinisloadedorunloaded.asp

Regards,
Chad
 
W

Wassim

Dear Chad

I can not thank you enough.

Great informative reply, with links to go get more info on my own.

What does the adage say: "Give a man a fish you feed him once, teach
him how to fish, you feed him for ever". Well I shall eat heartily.
After I redesign my application that is ;-)

Would you like to join me for a meal?

You are simply wonderful. Thanks again.

Cordially

Wassim
 

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