View Single Post
  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Tricia Tricia is offline
external usenet poster
 
Posts: 25
Default Advance problem w/Mail Merge

I've got it to work - Thank you!!!

"macropod" wrote:

Hi Tricia,

You can't use the same syntax for this in Word as you'd use in Excel. For starters, Table cell references in Word can only be used
to retrieve numbers - not text. Presumably, too, the value in Q3 is coming from a mailmerge field.

Consequently, in Word, you should bookmark the text (not the whole cell) in V2, U2 and W2 and, to replicate the text there, use a
series of fields coded as:
{IF{MERGEFIELD Hospital_ID}= 1 {REF V2BkMk}}
{IF{MERGEFIELD Hospital_ID}= 2 {REF U2BkMk}}
{IF{MERGEFIELD Hospital_ID}= 3 {REF W2BkMk}}
where 'Hospital_ID' is the name of the data field from which the 1, 2 & 3 are sourced and V2BkMk, U2BkMk & W2BkMk are the bookmark
named assigned to the relevant text strings. The fields can all be on the one line - I've put them on separate lines for
readability.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[Microsoft MVP - Word]


"Tricia" wrote in message ...
That is exactly what is happening. I created a mail merge for a co-worker
who has to send out confirmation information to several people after she gets
them scheduled for a procedure with all of their information. One of the
paragraph changes depending on the hospital they are having the procedure
performed at. So what I did is create a =IF(Q3=1,V$2,IF(Q3=2,U$2,
IF(Q3=3,W$2))) each of the columns have text in them. Any clue as to how to
get the text to show instead of "False"?

"Peter Jamieson" wrote:

Do you mean that you have a column in your Excel sheet that is populated
using an =IF formula?

If so, my best guess is that the OLE DB provider that Word uses to get
data from Excel has decided that the data type of the column containing
your =IF formulas is "text", in which case I think all the results may
be provided to Word as "false". (see http://tips.pjmsn.me.uk/t0003.htm
for more info. about this). I am not sure how to check that, but maybe
you could have a look around.

If not, can you spell out what you are doing.

Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv

Tricia wrote:
I have an excel database I'm pulling my information from into a Word 2007
document. One of the fields I am pulling from is a "IF" field. Every time I
merge my document it will not pull the correct information. It always pulls
"FALSE" instead of the value that is in the field.