Problem on inserting RTF file.

M

melon

I have the following RTF file

{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0
Times New Roman;}{\f2\fcharset0 Microsoft Sans Serif;}}{\colortbl
\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain
\ltrpar\itap0{\lang1033\fs16\f2\cf0 \cf0\ql{\fs24\f2 {\ltrch This is
test}\li0\ri0\sa0\sb0\fi0\ql\par}}}

That basically has a string with font size 12.

When I open the RTF file, the font size is set at 12 correctly.
However when I tried to insert it to a Word document, the 12 font size
will magically become 10. All other formatting (font family, font
weight, or any font size other than 12) is intact.
 
C

Cindy M.

Hi Melon,

It would really be better for you to ask this question in an end-user
newsgroup, rather than one for programming. You're much more likely to
find people there who better understand about how Word deals with file
conversions. And when you post you should *always* mention which version
of Word is involved.

My best guess would be that what you're seeing has to do with the default
font settings in the target document (the font of the Normal style) and
that what you're inserting has no specific style formatting, so is
"Normal" is being applied.

By design, Word will format in-coming text with the target document's
styles. Only formatting linked to styles not defined in the target
document will retain their original formatting.
I have the following RTF file

{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0
Times New Roman;}{\f2\fcharset0 Microsoft Sans Serif;}}{\colortbl
\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain
\ltrpar\itap0{\lang1033\fs16\f2\cf0 \cf0\ql{\fs24\f2 {\ltrch This is
test}\li0\ri0\sa0\sb0\fi0\ql\par}}}

That basically has a string with font size 12.

When I open the RTF file, the font size is set at 12 correctly.
However when I tried to insert it to a Word document, the 12 font size
will magically become 10. All other formatting (font family, font
weight, or any font size other than 12) is intact.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

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

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

Similar Threads

Send EMail in RTF Fotmat 3
Scrambled e-mails 0
What am I missing? 7
Save each chapter in different file 1

Top