Command buton lauches Word file

  • Thread starter Thread starter Mark M S
  • Start date Start date
M

Mark M S

To launch a Word file is easy from the Command button wizard. You see this
procedure:

Private Sub Command183_Click()
On Error GoTo Err_Command183_Click

Dim oApp As Object

Set oApp = CreateObject("Word.Application")
oApp.Visible = True

Exit_Command183_Click:
Exit Sub

Err_Command183_Click:
MsgBox Err.Description
Resume Exit_Command183_Click

What information would I need to add to open a specific Word file like
newborn.doc - a path c:\word\newborn.doc ?
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 
Hi Mark,

I use something like:
Dim oApp as Object
Set oApp = CreateObject("Word.Application")
With oApp
.Documents.Open (Full Path to Document Here)
.Visible = true
End With

HTH
Byron
 
Actually that suggestion didn't work for some reason so I tried the run
application and then included the winword.exe with the path and it ran
great. Thanks for the suggestions.

--
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 
Back
Top