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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force doc to open in web view 2

Status
Not open for further replies.

Jazztpt

Vendor
Feb 16, 2005
50
I would like to open a word doc and force it to open in web view everytime. I have tried a macro and named it AutoOpen but
it applies globally and I only want to force this particular document.
Presume a bit of VBA or a macro to run on file open would do it but not sure how to go about it.
Cheers
Jazztpt
 
Hi Jazztpt,

If you put your AutoOpen macro in the Document, it will only run for the document.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
When you record a macro it defaults to normal.dot, so it applies globally.

So, just to be more specific to Tony's suggestion....put the macro code in the Document_Open event in the ThisDocument module. That way it applies ONLY to that document. In the ThisDocument module there is a dropdown at the top left of the code window. Chose Document. The code window will default to the Document_New Sub. Delete that, and chose Document_Open from the dropdown on the top right side of the code window. Put your code there.


Gerry
See my Paintings and Sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top