I have the following code (which opens a NEW Word document and prints the
data from my ACCESS form) -- I need code that will open a specified WORD
template and insert the ACCESS data into a specific bookmark. I'm sure this
is a simple process, but I'm somewhat frazzled (at this point) and have
settled on this option over several previous suggestions. Here's the code I
need to modify:
==================================
'The following code outputs the Print Detail data to a NEW Word document
'On Error GoTo Err_Command83_Click
'Dim stDocName As String
'Dim MyForm As Form
'stDocName = "PrintDetails"
'Set MyForm = Screen.ActiveForm
'DoCmd.SelectObject acForm, stDocName, True
'DoCmd.PrintOut
'DoCmd.SelectObject acForm, MyForm.Name, False
'Exit_Command83_Click:
'Exit Sub
'Err_Command83_Click:
'MsgBox Err.Description
'Resume Exit_Command83_Click
Ken Sheridan - 18 May 2007 17:58 GMT
You can download a file from the link below which includes examples of
various Access to Word automation operations including inserting data into
bookmarks in a Word document:
http://community.netscape.com/n/pfx/forum.aspx?msg=23781.1&nav=messages&webtag=w
s-msdevapps
Ken Sheridan
Stafford, England
> I have the following code (which opens a NEW Word document and prints the
> data from my ACCESS form) -- I need code that will open a specified WORD
[quoted text clipped - 22 lines]
> 'MsgBox Err.Description
> 'Resume Exit_Command83_Click