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

switchboard option to MS Word

Status
Not open for further replies.

gille

Technical User
Nov 11, 2002
2
0
0
BE
Is it possible to start an existing MS Word document with a switchboard option?

gille
 
You can use this code to open a Word file from a command button.

Call Shell("C:\program files\Microsoft Office\Office\winword.exe Pathname\FileName.doc", 1)
 
Thanks, Worked Great!!

gille
 
Hi - OK I'm trying to do almost exactly this, except that I want to open a merge document with a button on a form.
The merge document is pointed at a query which draws its between values from the same form.
This works fine for passing those values to Reports - but I can't seem to get it to work for documents; This is code I gleened from your thread; (what am I doing wrong here? please? anybody?)

Private Sub OpenVisitsDocument_Click()
On Error GoTo Err_OpenVisitsDocument_Click

Call Shell("C:\Program Files\Microsoft Office\Office\WINWORD.EXE S:\CACTI\CACTI Forms\Second Visit\Clinic Visit exp.doc", 1)
Exit_OpenVisitsDocument_Click:
Exit Sub

Err_OpenVisitsDocument_Click:
MsgBox Err.Description
Resume Exit_OpenVisitsDocument_Click

End Sub

"Man is the cheapest computer we can put into a spacecraft and the only one we can mass-produce with unskilled labor." Werner von Braun

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top