Email MailMerge strMailBody Question
Hello,
I am using the following code to construct the strMailBody in Word 2003 VBA
module.
strMailBody = _
vbCrLf & vbCrLf & "Hello " & _
objMerge.DataSource.DataFields("FirstName") & "," & _
vbCrLf & vbCrLf & _
"Please find attached a receipt for your recent payment." & vbCrLf &
vbCrLf & _
"Don't hesitate to contact me should you have any questions." & vbCrLf
& _
vbCrLf & _
"Regards," & vbCrLf & _
"Chris"
This works but I would like to change this to do the following. I need to
check the .DataFields(ParentsNames) to see if it's null. If it is then enter
..DataFields(FirstName). If it isn't null then I want to enter
..Datafields(ParentsNames).
What is the required syntax? Thanks in advance.
Regards,
Chris
|