Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail merge

Status
Not open for further replies.

gj0519

MIS
May 8, 2003
69
US
I am creating a merge document that looks at many fields from my source. I have 2 fields that hold balances, what I am trying to do is check the value of Bal2, and then only show 1 field depending on the value. I have not wrote vba for word before, so not sure how to do this.

Thanks,

GJ
Code:
Sub check()
    If Bal2 > 0 Then
        Bal1
    Else
        Bal2
    End If
End Sub
 
You may do the conditional in the MERGEFIELD.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I created a formula which worked out.
Don't use word very much, so not familiar with it.

Thanks for the advice,

Gj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top