Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
ram ram is offline
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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 Mayors 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
ram ram is offline
external usenet poster
 
Posts: 18
Default 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 Mayors 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



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge Multiple Records from Excel into Word Mail Merge Jim[_6_] Mailmerge 1 January 8th 09 10:08 PM
mail merge missing records marti Mailmerge 1 June 7th 07 10:02 AM
Combine Mail Merge records when different records have 1 common fi TFFAV Mailmerge 1 December 12th 06 11:56 PM
Mail merge several records on one page Pixie Mailmerge 2 October 24th 06 11:58 AM
how do I save mail merge records Sherry Mailmerge 7 August 15th 05 09:22 PM


All times are GMT +1. The time now is 03:48 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"