Opening a word document from Access 97

S

Steven Forbes

I want to open a word document template from Access 97 to
allow a form to be filled out and emailed. What would you
suggest as the best way to accomplish this?

Thanks,
Steven Forbes
Verizon Engineering Service Group
 
H

Harold Kless[MSFT}

You can assign this code to the click event of a button.
Private Sub Command0_Click()
Dim oWord As Object
Dim oDoc As Object
Set oWord = CreateObject("Word.Application")
'correct the path and document name below.
Set oDoc = oWord.documents.Open("[path to document]\document.doc")
'if you are going to create a new document from a template you would use
this code:
'set oDoc = oWord.documents.Add("[path and name of template]")
oWord.Visible = True
End Sub


Harold Kless, MCSD
Support Professional
Microsoft Technical Support for Business Applications
(e-mail address removed)

--


This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top