If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Mail Merge looping through records
HI
I'am using the code below to check or uncheck a box based on the value in a merged field. I don't know how to loop through all the records. it only compares the value once and not for each record With ActiveDocument If .MailMerge.DataSource.DataFields("Field1") 0 Then .FormFields("check1").CheckBox.Value = True Else .FormFields("check1").CheckBox.Value = False End If End With End Sub |
#2
|
|||
|
|||
Mail Merge looping through records
FormFields and mail merge are not compatible.
See the article “Combining FormFields and Mail Merge” on the following page of fellow MVP Graham Mayor’s website: http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm If that information is of use to you, please do consider contributing to the maintenance of that website to ensure its continued availability. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "ram" wrote in message ... HI I'am using the code below to check or uncheck a box based on the value in a merged field. I don't know how to loop through all the records. it only compares the value once and not for each record With ActiveDocument If .MailMerge.DataSource.DataFields("Field1") 0 Then .FormFields("check1").CheckBox.Value = True Else .FormFields("check1").CheckBox.Value = False End If End With End Sub |
#3
|
|||
|
|||
Mail Merge looping through records
Thank You for this information- I'll continue to use the checkbox symbol with
If then. "Doug Robbins - Word MVP" wrote: FormFields and mail merge are not compatible. See the article “Combining FormFields and Mail Merge” on the following page of fellow MVP Graham Mayor’s website: http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm If that information is of use to you, please do consider contributing to the maintenance of that website to ensure its continued availability. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "ram" wrote in message ... HI I'am using the code below to check or uncheck a box based on the value in a merged field. I don't know how to loop through all the records. it only compares the value once and not for each record With ActiveDocument If .MailMerge.DataSource.DataFields("Field1") 0 Then .FormFields("check1").CheckBox.Value = True Else .FormFields("check1").CheckBox.Value = False End If End With End Sub |
Thread Tools | |
Display Modes | |
|
|