1
1encapdiva
I am a newbie and need some help on how to program a command button to pull
data from the database backend and merge it into a Word template. Can I do
this?
I used code I found on this website as a foundation.
Private Sub ApptRemind_Click()
Dim objWord As Object
Dim objMergeDoc As Object
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set objWord = CreateObject("Word.Application")
End If
Err.Clear
objWord.Visible = True
objWord.Activate
Set objMergeDoc = objWord.Documents.Add("j:\billing\reminder.dot")
data from the database backend and merge it into a Word template. Can I do
this?
I used code I found on this website as a foundation.
Private Sub ApptRemind_Click()
Dim objWord As Object
Dim objMergeDoc As Object
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set objWord = CreateObject("Word.Application")
End If
Err.Clear
objWord.Visible = True
objWord.Activate
Set objMergeDoc = objWord.Documents.Add("j:\billing\reminder.dot")