Thread
:
DocVariable and font caracteristics question
View Single Post
#
2
Posted to microsoft.public.word.docmanagement
Graham Mayor
external usenet poster
Posts: 19,312
DocVariable and font caracteristics question
The charformat switch applies the format applied to at least the first
character of the field - so you could apply the format to the whole field -
which in effect is what occurs. You cannot format only part of a field. You
would either have to use a combination of fields or use vba to convert the
field to text and format it as you require.
--
Graham Mayor - Word MVP
My web site
www.gmayor.com
Word MVP web site
http://word.mvps.org
"Eric L" Eric
wrote in message
...
Hello,
i am working on a little DocVariable based template and i was unable
to find any answer on the "possibility" of the following:
I created my DOCVARIABLE Field (actually many of them)
I have no problems using vba to add them to my document and manage them
and update their value & al
Now my issue lies here.
While i found out that using \* CHARFORMAT switch in my field code i can
modify the font and style of my field and its persistant thru update (when
you applies the font and style to the first character of the
{[D]OCVARIABLE
"varname" \* CHARFORMAT}, its pretty neat but what if i would like to use
field for scientific notation
lets say my field is named watermolecule and the value is H2O, is it
possible to set 2 as superscript?
I found out that if i set the D to superscript then my value H2O will be
all
superscript.
I know that i can use the "ascii" code 0178 to get 2 in "superscript" but
my
goal objective contain many others number and caracter in superscript or
subscript and different format for some part of the string in value ex:
value
= BOLD{Mr} NORMAL{James b.}
or Msuperscript{e} BOLD{Jack Brown}
etc etc.
Any help would be appreciated.
Reply With Quote
Graham Mayor
View Public Profile
Find all posts by Graham Mayor