
Signature
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
Doug,
Thank you for your post. I see what you are I'm very familiar with ctl+F9
but I'm not sure I understand what you mean about EACH pair. Does that mean
I will have to highlight the whole string when finished and ctl+F9 that to
enclose it? So, if I'm reading correctly, in your example I would need to do
the ctl+F9 seven (7) times. I've done this and I am still getting strange
results.
Also, I seem to recall this being MUCH easier in Word 2000. I noticed in
Word 2003 on the Mail Merge toolbar that I have the Insert Word Field button.
That brings me to the IF-THEN-ELSE wizard. Can I use that to write the
statement? What's throwing me is the "Compare To" section (see below)
If:
Field Name: [Title]
Comparison: [is blank]
Compare to: [what do I put here?]
Then:
Insert Text: [which I want to be the FirstName field]
Otherwise: [which I want to be the Title field plus a space]
Thanks for any advice. I'm continuing to work on this.
Elf
> You should be using:
>
[quoted text clipped - 46 lines]
> >> Can someone help me out??
> >> Thanks!
Peter Jamieson - 19 Jul 2006 18:49 GMT
> but I'm not sure I understand what you mean about EACH pair.
Doug simply means that the {} need to be the special field code braces that
you can insert using ctrl-F9, not the ordinary characters "{" and "}". And
yes, I count 7 pairs in the construciton he gave you. If you have already
inserted them by other means, that's fine.
However, if your code only needs to work in Word 2003 (and maybe 2002) then
there is another approach to dealing with spaces in some scenarios, which is
to use the \b and \f switches in the MERGEFIELD field, e.g.:
{ MERGEFIELD Title \f " " }{ MERGEFIELD First \f " " }{ MERGEFIELD Last }
The reason most people here prefer to use the "direct approach" to inserting
fields is probably because then you have precise control over what you're
doing.
Peter Jamieson
> Doug,
> Thank you for your post. I see what you are I'm very familiar with ctl+F9
[quoted text clipped - 75 lines]
>> >> Can someone help me out??
>> >> Thanks!