Word Automation - Inserting RTF Text

J

Jonathan Wareham

Hi,

I am writing an application that creates a Word document using automation by
inserting RTF text held in a database. I am currently doing this using the
following method :

1. Read RTF code from database field
2. Copy to Windows clipboard as RTF data (vbCFRTF)
3. Use WordApp.Selection.Paste to insert into document

This works to a point and retains the font, size, style etc contained in the
RTF but messes up the formatting in the document.

I just wondered if anybody can suggest a better way of going about this?

Any help appreciated,

Jonathan
 
C

Cindy M -WordMVP-

Hi Jonathan,

Can you be a bit more concrete about what you mean by "messes up the
formatting in the document"?
I am writing an application that creates a Word document using automation by
inserting RTF text held in a database. I am currently doing this using the
following method :

1. Read RTF code from database field
2. Copy to Windows clipboard as RTF data (vbCFRTF)
3. Use WordApp.Selection.Paste to insert into document

This works to a point and retains the font, size, style etc contained in the
RTF but messes up the formatting in the document.

I just wondered if anybody can suggest a better way of going about this?

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

Top