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

How to

Status
Not open for further replies.

unclesvenno

Programmer
Sep 12, 2004
33
AU
Heya,

I have an MS Word document which I have linked to an html page via the following HTML code:

<a href="S:\blah\...\toClient v3.0.doc" target="_blank">

The MS Word document (toClient v3.0.doc) has a VBA Form which loads on the "Document_Open()" event. This works fine if the user saves the document to their desktop and re-opens it. But it fails to load the VBA Form if the user selects the "Open" option.

I've marked the MS Word document as a read-only file because it is a shared template. BTW, I have not created it as a template (.dot) because, instead of creating a new instance of the template it opens the template for editing!

I see 2 possible solutions:
1. to disable the "Open" option from the file download dialogue box?
2. to write some HTML which will open an instance of a template, ie "toClient v3.0.dot"?

Would love some assistance (code samples or better ideas) on this.

Many thanks,
Uncle Svenno
 
Try your code in the DocumentChange event instead of DocumentOpen maybe? DocumentChange fires when a new document is created, when an existing document is opened, or when another document is made the active document. Worth a try anyway.

[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top