Word XP changes font in automation

L

Lynda

How do I force Word for Office XP to use the original font
in pasted text rather than applying its own? Normally
when you copy and paste text, the font attributes go with
the text but this isn't happening in Word for Office XP.

We have a Word automation process that has been running
without error for many years (the documents were created
in Word 95 and 97.) The process merges text under program
control and then copies and pastes the modified text into
a new blank document for printing. No changes are saved.
Most workstations run Word 97 and a few have Word 2000.
We recently added an XP workstation running Word from
Office XP. On this workstation only, the automated
documents print with a 12 point font rather than the 10
point font specified in the template. The 10 point font
is clearly available on the machine, and we've tried every
setting that seems even remotely related to try and modify
this behavior. The ONLY way we can get the automation
process to work on this machine is to copy the Normal.dot
used to create the original documents (in Word 97 format)
onto this workstation and to caution the user to NEVER,
NEVER allow Word to update it to the newer format when
they use Word interactively. If Normal.dot is updated, the
automation no longer works properly.

I thought I could simply replicate the styles used in the
older Normal.dot in the version for Word XP and have the
problem solved. However, when I open this older
Normal.dot with my copy of Word 2000, I don't see any user
defined styles at all.
 
C

Cindy M -WordMVP-

Hi Lynda,

A lot depends on styles, and direct formatting, and which
percent of text carries direct formatting, but...

The way copy/paste works was changed in Word 2002, and the
same VBA commands won't necessarily yield the same results.
My recommendation would be to look at the PasteAndFormat
method. I'm guessing if you use that with the
wdFormatOriginalFormatting constant you may get the result
you're looking for.
How do I force Word for Office XP to use the original font
in pasted text rather than applying its own? Normally
when you copy and paste text, the font attributes go with
the text but this isn't happening in Word for Office XP.

We have a Word automation process that has been running
without error for many years (the documents were created
in Word 95 and 97.) The process merges text under program
control and then copies and pastes the modified text into
a new blank document for printing. No changes are saved.
Most workstations run Word 97 and a few have Word 2000.
We recently added an XP workstation running Word from
Office XP. On this workstation only, the automated
documents print with a 12 point font rather than the 10
point font specified in the template. The 10 point font
is clearly available on the machine, and we've tried every
setting that seems even remotely related to try and modify
this behavior. The ONLY way we can get the automation
process to work on this machine is to copy the Normal.dot
used to create the original documents (in Word 97 format)
onto this workstation and to caution the user to NEVER,
NEVER allow Word to update it to the newer format when
they use Word interactively. If Normal.dot is updated, the
automation no longer works properly.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 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 :)
 
L

Lynda

Thanks Cindy. I don't know why I didn't see your message
sooner! We do still have this problem and I really need
to get back to work on solving it. If there were
significant changes in Word 2002, that rather confirms my
suspicions about possible solutions though.

The Word Basic (not VBA) commands are embedded in a much
larger Visual FoxPro application. We know they need to be
upgraded to more current syntax and that such a change
would allow us to better control the formatting through
code. However, we are prevented from producing new builds
of the application because at least one critical component
is missing from the application's source code. Developing
a work around for the missing component will likely allow
us to solve the font issue as well.

I appreciate your input.
 

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