General information
Category:
COM/DCOM and OLE Automation
>>I am trying to create a MailMerge document from within VFP6.0 that switches between 2(or more) bitmaps depending on a merged data fields value. For example: One of the mailmerge fields is called "access_type". There are two values for access_type: VND and STD. For VND records I want picture "VND.BMP" to show and for STD records I want "STD.BMP" to show. The pictures do not reside in the database. I've tried using the macro recorder in Word, but the code I get is .ActiveDocument.MailMerge.Fields.AddIf(.Selection.Range, "access_type", wdMergeIfEqual, "VND", "", "MailMergeInsertIf3", "", "MailMergeInsertIf4")
>>. How do I get to the code behind the "MailMergeInsertIfX" so I can put that back into the VFP side?
>
>I think you'll be better off taking a look at the field that ends up in the Word document and trying to build it. Sounds like you're using an {IF}. Check out the AddIf method.
>
>Tamar
You are correct, I am trying to use the {IF}. The "access_type" field doesn't end up in the document, it is just there to tell which bitmap to use inside the mailmerge. At least that's what I was hoping to do with it. I have been looking at the AddIf and the AddPicture, but I haven't been able to figure out how to combine them. The documentation I have found goes back to having the pic in the database not just an external file(for use with the AddIf).
Paul
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only