Malcolm,
If there isn't going to be any interaction between Access and Word, you can
use this:
http://www.pacificdb.com.au/MVP/Code/ExeFile.htm
However, if you want some form of interaction between Access and Word, you
need to use Automation:
Private WithEvents wrd As Word.Application
Private WithEvents doc As Word.Document
Private sPath2File As String '*** For example only
Private Sub Command0_Click()
sPath2File = "Z:\Document Flowchart.doc" '*** For example only
Set wrd = New Word.Application
wrd.Visible = True
Set doc = wrd.Documents.Open(sPath2File)
End Sub
Private Sub doc_Close()
MsgBox "The document was just closed."
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
doc.Close wdDoNotSaveChanges
wrd.Quit wdDoNotSaveChanges
Set doc = Nothing
Set wrd = Nothing
End Sub
Private Sub wrd_Quit()
MsgBox "Word was just shut down."
End Sub
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia