docVariables come out bold

T

Terrycoco

I have written some VBA code (from Access) which compiles a documen
based on several other documents and puts it into a new document that i
macro enabled. Then, when the user opens the new document they ar
able to open an underlying word form and enter in some final informatio
which is repeated throughout the document, thereby saving them time i
entering those fields. These are docVariable fields which I have place
into the document through the VBA code. When they are finished fillin
out the form, they click a button and all the fields (the docVariables
in the document are updated. They may need to do this several times
editing their answers and re-updating. Everything works beautifull
EXCEPT some fields are BOLD and some are not! I have looked everywher
in every forum and can't find anything about this. Why is thi
happening? How can I ensure, through VBA, that the DocVariable field
will not suddenly be bold, but will remain the same format as th
surrounding text? PLEASE HELP ME
 
S

Stefan Blom

To force DOCVARIABLE fields to make use of the formatting applied at the
insertion point, add the \* CHARFORMAT switch to the field code. (Strictly
speaking, the \* CHARFORMAT field uses the formatting applied to the first
letter of the field code.)
 

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