View Single Post
  #11   Report Post  
haliburton girl
 
Posts: n/a
Default

Graham,
It is almost perfect but at the end of each of my directory lists there is a
comma. Is there any script that will tell it that it is the end and no
comma? Or should I take them out manually?
thanks,
J

"Graham Mayor" wrote:

Add a \*charformat switch (or change the \*mergeformat switch if present)
to the offending fields. eg

{Mergefield fieldname \*charformat} this will cause the merge to adopt the
formatting of the inserted field.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


haliburton girl wrote:
Another frustrating thing. I try and try to format the main document
to Times New Roman 10 and it seems to do it, but when I merge those
fields are some other font.
thanks,
Jan

"Graham Mayor" wrote:

To create a conditional (IF) statement in mail merge, the simplest
method is to insert it from the keyboard directly. For this you need
to know the names of the fields and that CTRL+F9 inserts field
boundaries {}.

The construction is then similar to

{IF {Mergefield Field1} "" "{Mergefield Field1},"}

What this means is that if the content of the field called field1
(substitute your own field name) is not equal to nothing then insert
the bits between the speech marks ie the contents of the field and
the comma following it.

ie
{IF {Mergefield Fieldname} "" "enter this" "otherwise enter this"}

Having entered the fields select them and press F9 to update them,
then if necessary ALT+F9 to tooggle the display to show the result.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


haliburton girl wrote:
*I* have introduced it between fields as I want it to look like a
list.

I will try to make an "if" statement, but what is the condition.
Do I just put an "if" merge field 1 then merge field 1, I am sorry
but WORD confuses me in its insert word field. Is that where I
find the "if" statement. If so, which one?
thanks,

"Graham Mayor" wrote:

Yes, but is the comma in the data or have *you* introduced it
between fields?
eg
{Mergefield field1},{Mergefield Field2}, etc

If the latter, then you need a set of conditional fields eg

{IF {Mergefield Field1} "" "{Mergefield Field1},"}{IF
{Mergefield Field2} "" "{Mergefield Field2},"} etc

ie you conditionally place the field and the comma if the field is
not empty. If it is empty nothing is inserted.

If the former then you need to trap whatever an 'empty' field
produces in a similar manner.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


haliburton girl wrote:
I am making a directory. Some of the fields in my database are
blank. When merging them the comma stays between each entry so
the blank ones show as a comma each time.
Jan

"Graham Mayor" wrote:

If this is a data file, you would expect the commas to be
present. They mark the fields. If they are in the merged
document, where are they coming from?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


haliburton girl wrote:
I am trying to make a directory. I have the fields listed but
when the data is put in, the commas remain for blank fields. It
looks like this teaching,,,,,writing,speech,