Publishing Access to Word loses formatting

  • Thread starter Thread starter pow67
  • Start date Start date
P

pow67

Using Access 97 I have created a report which prints some names in
"BoldColor" and others in "DefaultColor" which are defined in the
following module:

Public Const BoldColor = vbRed
Public Const DefaultColor = vbBlack

The code for the sub in my report is:

If (Me![BOLD] Or Me![Plus]) = True Then

Me![Name].ForeColor = BoldColor
Else

Me![Name].ForeColor = DefaultColor

End If

Everything looks fine on the Access screen however when I publish to
Word 2000 the field, [Name] ignores "BoldColor" and prints all [Name] in
the "DefaultColor".

I really need to finish this project.

Thanks in advance.

CW
 
Me![Name] is the text field titled "Name" in my report.

As I stated in my first post, in the Access program preview everything
works fine including being able to change colors on the "DefaultColor"
which does pass through to Word when published. The only problem is that
my if ..then statement for [Bold] is ignored when published to Word.

CW
 
Hi Pow67,
As I stated in my first post, in the Access program preview everything
works fine including being able to change colors on the "DefaultColor"
which does pass through to Word when published. The only problem is that
my if ..then statement for [Bold] is ignored when published to Word.
"Publish to Word" generates an RTF file. You might need to ask in an
Access group if anyone knows what this little "Wizard" can and cannot
do... But there's certainly a lot that it cannot do. Personally, I don't
like it.

To get a really good result, you need to automate Word and create the
report that way.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
 
Back
Top