Starting Word from Access

P

Phil

I need to start Word 2000 from Access 2000 and open a file called New Month.Doc.

Any help?

Thanks
 
D

Doug Robbins - Word MVP

Hi Phil,

Dim WordApp As Object
Dim WordDoc As Object

On Error GoTo CreateWordApp
Set WordApp = GetObject(, "Word.Application")
On Error GoTo 0
'Open Document
Set WordDoc = WordApp.Documents.Open("Drive:\Path\New Month.Doc")
WordApp.Visible=True


CreateWordApp:

Set WordApp = CreateObject("Word.Application")
Resume Next

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
Top