View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Mail Merge Format Text String

Hi Peter,

What you're asking can't be done that way. If you need parts of your text to have different formatting, those parts need to be in
separate fields in your data source. Alternatively, if you add suitable tags to your data field (as it seems you're prepared to do),
you could use a macro after running the merge to find the tags, remove them and re-format the intervening text as desired.

--
Cheers
macropod
[MVP - Microsoft Word]


"Peter Hibbs" wrote in message ...
I am using Access 2003 to create a mail merge document using
Automation. For reasons too complicated to explain here I have a Memo
field (plus a number of other fields) in an Access table which will be
the source data for the mail merge. The Memo field will contain
between one and 20 lines of text.

What I would like is to have the ability to add some rudimentary
formatting to the various lines of text in this field. The problem is
that, at the moment, any formatting done to the field affects all the
text in the field - all bold, all italics, etc. What I need is to
allow the user to enter some sort of control code in the text which
would then enable/disable formatting.

For example, if I had something like this in the Memo field :-

This is normal text [b] this is bold [b] this is normal.

then Word would change the [b] character sequence into the equivalent
of ^B and show the text between them in bold. I don't need anything
more fancy then that, bold, italics and underline would suffice.

Is there any way to add some sort of If-Then-Else control codes in the
mail merge field which could check the string and apply the
appropriate formatting.

Peter Hibbs.