Remove Mergefield to keep rich text

T

tighe

I have trying to get this suggestion to work from mvps.org:

this suggestion is to keep Rich Text when creating a merge document.

Display the field codes and remove word "mergefield" from the field, leaving
only the field name. In the example, the content come out with filed Remarks
as Arial, and yellow.
Example: { Remarks }

I am using office 2007 with data stored in access as a rich text memo field
and merging into a word document. I have tried changing my data source from
an actual table in access to an html document, a RTF document, excel
spreadsheet, and a docx based off the html document.

obviously a lot of people would like to seea rich text merge field so if i
can get this to work maybe i can then help others.
 
P

Peter Jamieson

In my experience, the approach of using a word data source and using a
REF field instead of a MERGEFIELD does work, at least in simple cases.

I would expect .doc, .docx and .rtf to work, but with .htm it depends on
the mechanism Word uses to get the data, which can either be its
internal text converter (which would probably work) or an OLE DB
provider (which would not).

However,
a. this technique goes back to the early days of Word before
MERGEfiELD fields existed, and cannot really be regarded as "supported"
b. You don't say anything about what you are actually seeing. Is there
any sign that it is working at all? Or perhaps some of the formatting is
there, but not enough for it to be a useful technique for you?

Peter Jamieson

http://tips.pjmsn.me.uk
 
T

tighe

thank you for your quick response

i have tried .doc, .docx .rtf and direct Access Table link as source data
and the closest format for source data when merged is a docx, the formatting
was kept by outputing an Access table to html then saving as the ultimate
docx used as the source data.

b. what i am actually seeing is no direct formatting: if something is bold
it keeps the format of the merge field. the only thing that does come
through are bullet points but bullets become numbers; numbers become bullets.
But not reliably or consistently.

if i could at least have the bullets merge successfully and reliably that
would be enough for now of course if Bold, italics and underlines are
possible that would be best.

i have seen your other post suggesting: "The most straightforward approach
is to export each RTF field to a file that has a name that is somehow related
to key columns in the record (e.g. if you have a table with an ID field
called ID with values 1,2,3,4, export your rtf field to files called
rtf1.rtf, rtf2.rtf etc., then use a nested INCLUDETEXT field to include the
rtf files: { INCLUDETEXT "c:\\whatver\\rtf{ MERGEFIELD ID }.rtf" }." I have
12 merge fields to deal with and a wide range of records, from 200-800,
depending on the job and could not understand how to apply this to my
situation.

thanks in advance for all help past and present.
 
T

tighe

On a recent test Bold, undeline, format did merge but the bullets are still
opposit and unreliable, si i guess that is the only issue left.

thanks in advance for all help pasta dn present.
 
P

Peter Jamieson

Yes, what I see is:
- text in the data source that has no direct formatting applied takes
on the formatting of the merge field
- text that has direct formatting applied will be (roughly speaking)
"formatting of the merge field + direct formatting@
- bullets and numbering don't get through.

I'm not sue it's worth trying to get any further along that route.

I'll reply later about the other suggestion when I've had a look at the
Office 2007 aspects of it - may not be until tomorrow.


Peter Jamieson

http://tips.pjmsn.me.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top