Letter merge using backend data



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

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


objWord.Visible = True

Set objMergeDoc = objWord.Documents.Add("j:\billing\reminder.dot")

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