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

Printing Word document from Access 2003

Status
Not open for further replies.

ishfady

Programmer
Sep 14, 2002
31
GB
Hi

Please could you help me.

I am bit new to this. I have microsoft access 2003 database.
I want to print Microsoft word document from my access database. Data is coming from access database as query or recordset. Which need to be added to the word document.

Please could advice me, how i go about this.

many thank
 
Ive done this ... but a little pre setup is invloved

First setup a make table query that will hold only the data that will be needed for the document.

then mail merge you word doc to that made table.


then on a button click event in your form.


add code to run the make table query an launch word...


Private Sub My_forms_event_button_Click()

DoCmd.SetWarnings False
DoCmd.OpenQuery "my_make_table_query", acViewNormal, acReadOnly
DoCmd.SetWarnings True


Dim appWord As New Word.Application
Dim strPath As String
strPath = "C:\my_path\my_mail_merged_letter.doc"
With appWord
.Visible = True
.Documents.Open strPath
End With


Set appWord = Nothing

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top