However, when I click on "Sent to word" button, something happens.
I realize it was written for MS Word 97 but I didn't see anything obvious in the code that would cause a problem with word 2010.
I only used "Name" and "Number" as bookmarks in the word document simply as a starting point to test.
I also commented out all the photo stuff as I will never need that.
Here's what I have as it stands. Doesn't throw any errors but nothing happens either.
Private Sub MergeButton_Click()
On Error GoTo MergeButton_Err
Dim objWord As Word.Application
'Copy the Photo control on the Employees form.
' DoCmd.GoToControl "Photo"
'Start Microsoft Word 97.
Set objWord = CreateObject("Word.Application")
'Make the application visible.
.Visible = True
'Open the document.
'Move to each bookmark and insert text from the form.
.Selection.Text = (CStr(Me.Name))
.Selection.Text = (CStr(Me.Number))
' .Selection.Text = (CStr(Forms!Employees!Address))
' .Selection.Text = (CStr(Forms!Employees!City))
' .Selection.Text = (CStr(Forms!Employees!Region))
' .Selection.Text = (CStr(Forms!Employees!PostalCode))
' .Selection.Text = (CStr(Forms!Employees!FirstName))
'Paste the photo.
'Print the document in the foreground so Microsoft Word will not close
'until the document finishes printing.
'Close the document without saving changes.
'Quit Microsoft Word and release the object variable.
Set objWord = Nothing
'If a field on the form is empty, remove the bookmark text, and
If Err.Number = 94 Then
objWord.Selection.Text = ""
'If the Photo field is empty.
' ElseIf Err.Number = 2046 Then
' MsgBox "Please add a photo to this record and try again."
' MsgBox Err.Number & vbCr & Err.Description
Any help is greatly appreciated. Thanks!
edit: I think i got it figured out. Let me do some testing. Be back with results!