Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have a SkipIf statement in a mail merge document which should skip the
record if the field 'badaddress' is equal to '*'. This is what I have: { SKIPIF { MERGEFIELD BADADDRESS } = "*" }. When I do the mail merge, I get this error: Word could not merge the main document with the data source because the data records were empty or no data records matched your query options. I get this error when a merge one record or a batch of records. When I remove the SkipIf statement, the merge works perfectly. I also tried { NEXTIF { MERGEFIELD BADADDRESS } = "*" } but I was still getting letters when 'badaddress = *'. Any suggestions? |
#2
![]() |
|||
|
|||
![]()
One reason why this happens because Word treats * and % as "wild card"
characters when it uses the comparison operators = or . However, as far as I know, it only treats them as wild cards if they are in the second comparand, i.e. try { SKIPIF "*" = { MERGEFIELD BADADDRESS } } Actually I would probably play safe and use { SKIPIF "*" = "{ MERGEFIELD BADADDRESS }" } but it probably isn't essential. Peter Jamieson "vanessa" wrote in message ... I have a SkipIf statement in a mail merge document which should skip the record if the field 'badaddress' is equal to '*'. This is what I have: { SKIPIF { MERGEFIELD BADADDRESS } = "*" }. When I do the mail merge, I get this error: Word could not merge the main document with the data source because the data records were empty or no data records matched your query options. I get this error when a merge one record or a batch of records. When I remove the SkipIf statement, the merge works perfectly. I also tried { NEXTIF { MERGEFIELD BADADDRESS } = "*" } but I was still getting letters when 'badaddress = *'. Any suggestions? |
#3
![]() |
|||
|
|||
![]()
Thanks!!!! That did the trick.
- Vanessa Peter Jamieson wrote: One reason why this happens because Word treats * and % as "wild card" characters when it uses the comparison operators = or . However, as far as I know, it only treats them as wild cards if they are in the second comparand, i.e. try { SKIPIF "*" = { MERGEFIELD BADADDRESS } } Actually I would probably play safe and use { SKIPIF "*" = "{ MERGEFIELD BADADDRESS }" } but it probably isn't essential. Peter Jamieson "vanessa" wrote in message ... I have a SkipIf statement in a mail merge document which should skip the record if the field 'badaddress' is equal to '*'. This is what I have: { SKIPIF { MERGEFIELD BADADDRESS } = "*" }. When I do the mail merge, I get this error: Word could not merge the main document with the data source because the data records were empty or no data records matched your query options. I get this error when a merge one record or a batch of records. When I remove the SkipIf statement, the merge works perfectly. I also tried { NEXTIF { MERGEFIELD BADADDRESS } = "*" } but I was still getting letters when 'badaddress = *'. Any suggestions? |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
mail merge with attachments | Mailmerge | |||
Word Compare and Merge Document Function | Microsoft Word Help | |||
13 numbers added to Word/Excel mail merge field | Mailmerge | |||
Can you create a multi-layered merge where certain merge fields a. | Mailmerge | |||
can data fields be added to an exisiting mail merge address list | Microsoft Word Help |