View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Vic[_2_] Vic[_2_] is offline
external usenet poster
 
Posts: 18
Default RTF Mail Merge Fields

Doug,

Thanks for the reply but I'm having a problem understanding how to implement
these switches. The rtf fields are inserted in an Access database using a
VB program and contain data such as:

{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fc harset0 MS Sans
Serif;}{\f1\fnil\fcharset2 Symbol;}}
\viewkind4\uc1\pard\lang1033\f0\fs17 OK - We need to change these text boxes
so that we can \b set strings of words to BOLD\b0 , change fonts, do
underlines and we also need to do bullets:
\par
\par
\pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnin dent0{\pntxtb\'B7}}Oranges
\par {\pntext\f1\'B7\tab}Apples
\par {\pntext\f1\'B7\tab}Pears
\par \pard
\par This all seems to work but when it gets merged into word, all of the
formatting characters show as text!
\par
\par
\par }

It appears to me from the use of these switches I can use /*charformat to
bold, underline and italics. So where are these switches implemented? I
tried as a test to press ctl F9 and inserted Graham's bold example { REF
chapter2_title \* Charformat } would display "Whales of the Pacific" but it
only displayed this as plain text without formatting.

I need to be able to have this done programmatically so I would assume I'd
need some sort of word macro. The VB program invokes the mail merge and
turns the document into a PDF which then gets merged with other PDF
documents to produce a final document as a PDF. So I suppose I'd have to
invoke the word macro to massage the word document after the mail merge is
completed. Would that be correct?

I don't see that bullets, indenting and font changes are supported with
switches. Are there any examples of using templates with docvariable
fields. There are about 20 merge fields that are inserted in this document.

Would you provide a bit of guidance on where to go from here? Are there
some examples somewhere for doing this. It would seem to me to be a quite
common occurance but I'm finding limited information on using switches and
merge fields that contain rtf data.

Vic






"Doug Robbins - Word MVP on news.microsoft.com"
wrote in message ...
For any more than the formatting that can be applied by use of Word field
formatting switches, I think that you would have to use a "roll-your-own"
equivalent to mailmerge where in place of a mail merge main document
containing mergefields, you would use a template containing docvariable
fields and then you would run a macro that would create a new document
from that template for each record in data source, setting the values of
variables in the document to the value of corresponding field for that
record in the data source and making use of the formatting information in
the data source to apply the required formatting.

For information on Word field formatting switches, see "Formatting Word
fields with switches" on fellow MVP Graham Mayor's website at:

http://www.gmayor.com/formatting_word_fields.htm


--
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, originally posted via msnews.microsoft.com

"Vic" wrote in message
...
Hello,

I am trying to setup a mail merge and use rtf text fields from a
database. These rtf fields contain the formatting instructions for
bolding, bullets, font settings etc. However, the problem I am having is
word does not recognize these formatting characters and prints everything
as plain text. My main document is an rtf file.

How can I get word to interpretate these instructions? I am using Word
2002.


Thank you,

Vic