Mail Merge Skips Some Records

  • Follow


I have used the following code to link Word Document to an Excel Spreadsheet 
(so that the document will update with the most recent information from the 
spreadsheet each time it is opened):

{IF {MERGEFIELD Program_Committee} = "X" "
Program Committee" ""} {IF { MERGEFIELD Program_Committee} = "Chair" "
Program Committee, Chair" ""}


The idea is that if the person on my list is a member of the Program 
Committee, there is an "X" in the merged field from my spreadsheet, and 
"Program Committee" is displayed in my document.  (Otherwise, nothing is 
displayed.) Likewise, if they are the Chair, the referenced cell contains the 
word "Chair."

The system is generally working, with one major exception:  If none of the 
first nine rows of the spreadsheet contain an "X" or the word "Chair", Word 
seems to stop "looking" for the X, and it returns a blank for all of the rest 
of the records.

If I put an X in any of the first 9 rows, everything works perfectly.  
Unfortunately, for one of my committees, none of the first 9 members of the 
group (listed alphabetically) are members.  

Why is my merge skipping these records?  Any clever solutions?
0
Reply Utf 2/11/2010 7:54:08 PM

Hi kmordecai,

The cause of the problem you're having is that Word queries the first 8 or so records to determine what kind of data each field has. 
At a guess, I'd say the empty rows lead Word to conclude that the field is numeric. If you put some dummy text data in the first few 
records, that should fix the problem. Provided you don't use either an 'X' or 'Chair', your existing field coding should still work.

-- 
Cheers
macropod
[Microsoft MVP - Word]


"kmordecai" <kmordecai@discussions.microsoft.com> wrote in message news:9F23BE93-05EC-438E-A5EC-7AF2A5496BF1@microsoft.com...
>I have used the following code to link Word Document to an Excel Spreadsheet
> (so that the document will update with the most recent information from the
> spreadsheet each time it is opened):
>
> {IF {MERGEFIELD Program_Committee} = "X" "
> Program Committee" ""} {IF { MERGEFIELD Program_Committee} = "Chair" "
> Program Committee, Chair" ""}
>
>
> The idea is that if the person on my list is a member of the Program
> Committee, there is an "X" in the merged field from my spreadsheet, and
> "Program Committee" is displayed in my document.  (Otherwise, nothing is
> displayed.) Likewise, if they are the Chair, the referenced cell contains the
> word "Chair."
>
> The system is generally working, with one major exception:  If none of the
> first nine rows of the spreadsheet contain an "X" or the word "Chair", Word
> seems to stop "looking" for the X, and it returns a blank for all of the rest
> of the records.
>
> If I put an X in any of the first 9 rows, everything works perfectly.
> Unfortunately, for one of my committees, none of the first 9 members of the
> group (listed alphabetically) are members.
>
> Why is my merge skipping these records?  Any clever solutions? 

0
Reply macropod 2/11/2010 11:13:20 PM

1 Replies
935 Views

(page loaded in 0.047 seconds)


Reply: