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!

VBScript to open Word

Status
Not open for further replies.

tcstom

Programmer
Aug 22, 2003
235
GB
Hi, I want a .vbs file that opens a specific Word document from a shared folder. I've seen other people ask similar questions but haven't seen any answers yet. The idea is that an intranet user clicks a link which runs the script to open a Word document in Word itself rather than the browser. It has to be done this way because the Word document is actually a template (.dot) that contains macros. Macros normally get stripped out if I link direct to the Word doc (even if I change file settings to stop Word docs opening automatically in the same browser window). Help appreciated. Thanks.

Tom
emo_big_smile.gif
 
Have you looked at this FAQ:
faq329-299

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Something like this ?
Set W = CreateObject("Word.Application")
W.Visible = True
Set D = W.Documents.Add("\path\to\template.dot")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top