"TO" address problems in email merge

T

Todd K.

I am trying to set up a merge document with a constant recipient and a
constant subject, but different data in the body. I set up the document as a
Word merge (see code below) and it works fine, but it doesn't recognize the
field "email_address" as the "TO" address for the email. I tried using the
..MailAddressFieldName command, but then it wants to dig through my Outlook
contacts and I just want it sent to a constant email address. Is there any
way to do that?

Option Explicit

Private Sub Document_Open()

Me.MailMerge.OpenDataSource _
Name:="c:\My Database\GOLD_Master1.mdb", _
SQLStatement:="SELECT TblTEMP_PIO.Grant_Type, TblTEMP_PIO.Project_ID,
TblTEMP_PIO.Award_Date, TblTEMP_PIO.Fund_Amt, TblTEMP_PIO.County,
TblTEMP_PIO.email_address FROM TblTEMP_PIO;", _
subType:=wdMergeSubTypeOther

With Me.MailMerge
.MailSubject = "Press Release"
.Destination = wdSendToEmail
.Execute
End With

End Sub
 
R

Russ Valentine [MVP-Outlook]

You'll want to post this in the proper group: Word's mail merge group.
 

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

Top