Help!

Correct use of * mergeformat? Has it changed in Word 2007?

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> New Users RSS
Next:  The font symbol is missing  
Author Message
LurfysMa
External


Since: Apr 10, 2005
Posts: 248



PostPosted: Mon Aug 06, 2007 3:12 pm    Post subject: Correct use of * mergeformat? Has it changed in Word 2007?
Archived from groups: microsoft>public>word>newusers (more info?)

What is the exact function of the " \* MERGEFORMAT" switch and when
should it be used and when not?

According to the 2007 help:

If you update a field, any formatting that you applied to the field
results may be lost. To retain the formatting, include the \*
MERGEFORMAT switch in the field code. When you insert fields by using
the Field dialog box, the \* MERGEFORMAT switch is included by
default.

What formatting are they talking about that may be lost?

How will the field behave differently with or without this switch?

Can you provide some examples?

--
Office 2007 Pro on WinXP
Back to top
LurfysMa
External


Since: Apr 10, 2005
Posts: 248



PostPosted: Mon Aug 06, 2007 8:17 pm    Post subject: Re: Correct use of * mergeformat? Has it changed in Word 2007? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 06 Aug 2007 11:12:16 -0400, LurfysMa
wrote:

>What is the exact function of the " \* MERGEFORMAT" switch and when
>should it be used and when not?
>
>According to the 2007 help:
>
>If you update a field, any formatting that you applied to the field
>results may be lost. To retain the formatting, include the \*
>MERGEFORMAT switch in the field code. When you insert fields by using
>the Field dialog box, the \* MERGEFORMAT switch is included by
>default.
>
>What formatting are they talking about that may be lost?
>
>How will the field behave differently with or without this switch?
>
>Can you provide some examples?

After some more research, it appears that the mergeformat switch
should be replaced by the charformat switch. But I cannot find a good,
clear definition of these two switches anywhere.

Can someone provide a complete and succinct description of these two
switches and compare their functions?

--
Office 2007 Pro on WinXP
Back to top
Ed
External


Since: Mar 10, 2006
Posts: 377



PostPosted: Tue Aug 07, 2007 4:04 pm    Post subject: Re: Correct use of * mergeformat? Has it changed in Word 2007? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi LurfysMa,

As far as I understand it ...

(Many) word fields have two views - "code view" where you see the field
definition (the curly brackets and stuff), and "result view" where you see
the value the field acquired the last time it was updated.

The MERGEFORMAT switch works something like this: if you update a field and
then apply formatting to the field *result* (not to the field code), that
formatting should be retained the next time the field is updated. If you
don't use the MERGEFORMAT switch, formatting that you apply to the field
result may not be retained when the field is next updated.

The CHARFORMAT switch works something like this: if you apply formatting to
the first character of the field type (e.g. to the "A" in an AUTHOR field) in
*code view* (not in result view) that formatting should be retained when the
field is next updated.

One way to see for yourself what's going on with MERGEFORMAT is to insert an
AUTHOR field in a document, update the field, apply, for example, bold, to
the first name, change the author (in File>Properties or Office
button>Prepare>Properties) and update the field again. And try the same thing
with names of varying lengths. If you apply the formatting to varying parts
of the field result you may find that you get unexpected results.

So in theory, CHARFORMAT enables you to control the format of a field's
result for all future updates, and MERGEFORMAT enables you to apply a format
to a field result, on the fly as it were, and have that newly-applied format
carried through to future updates of the field.

However, because of the unexpected nature of the results you get depending
on which bits of a field result you apply formatting to, and how the value of
the field may change with subsequent updates, I don't find the MERGEFORMAT
switch to be very reliable. In fact, I've never had a real-world occasion
where I've had to use it.

And because of its behaviour, it can lead to problems such as parts of text
in the results of, for example, a MERGEFIELD acquiring a format that they
shouldn't have. Another reason why I avoid them and why I've never understood
why the "Preserve formatting during updates" tick box in the field insertion
dialog (which inserts the switch) is selected by default for a lot of fields.

Hope this isn't too unclear.

Regards.

Ed


"LurfysMa" wrote:

> On Mon, 06 Aug 2007 11:12:16 -0400, LurfysMa
> wrote:
>
> >What is the exact function of the " \* MERGEFORMAT" switch and when
> >should it be used and when not?
> >
> >According to the 2007 help:
> >
> >If you update a field, any formatting that you applied to the field
> >results may be lost. To retain the formatting, include the \*
> >MERGEFORMAT switch in the field code. When you insert fields by using
> >the Field dialog box, the \* MERGEFORMAT switch is included by
> >default.
> >
> >What formatting are they talking about that may be lost?
> >
> >How will the field behave differently with or without this switch?
> >
> >Can you provide some examples?
>
> After some more research, it appears that the mergeformat switch
> should be replaced by the charformat switch. But I cannot find a good,
> clear definition of these two switches anywhere.
>
> Can someone provide a complete and succinct description of these two
> switches and compare their functions?
>
> --
> Office 2007 Pro on WinXP
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> New Users All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum