M
Mustapha Amrani
I am doing a mailmerge from VB. I generate a CSV data file first and than
defile the mailmerge document. I would like to have a condition if the
country field is "United Kingdom" omit printing the country and instead have
the postcode.
if {mergefield country}="United Kingdom" {postcode} {country}
How can I do this in the following:
With .Fields
.Add oApp.Selection.Range, "Title"
oApp.Selection.TypeText " "
.Add oApp.Selection.Range, "Initials"
oApp.Selection.TypeText " "
.Add oApp.Selection.Range, "Surname"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Add1"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Add2"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Add3"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Town_zip"
oApp.Selection.TypeText " "
.Add oApp.Selection.Range, "PostCode"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Country"
End With
Thanks
defile the mailmerge document. I would like to have a condition if the
country field is "United Kingdom" omit printing the country and instead have
the postcode.
if {mergefield country}="United Kingdom" {postcode} {country}
How can I do this in the following:
With .Fields
.Add oApp.Selection.Range, "Title"
oApp.Selection.TypeText " "
.Add oApp.Selection.Range, "Initials"
oApp.Selection.TypeText " "
.Add oApp.Selection.Range, "Surname"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Add1"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Add2"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Add3"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Town_zip"
oApp.Selection.TypeText " "
.Add oApp.Selection.Range, "PostCode"
oApp.Selection.TypeParagraph
.Add oApp.Selection.Range, "Country"
End With
Thanks