?
Solved

Rich Text (RTF) / Word Automation

Posted on 2002-04-15
2
Medium Priority
?
739 Views
Last Modified: 2011-09-20
I'm using VS .Net, and am having some trouble with Word Automation.  I have gotten far enough to be able to open up Word, create a new document, and use the "TypeText()" command to display text.  However, what I need to do is be able to add text that is stored in Rich Text Format to the Word Document.

The rich text that I need to display in the Word document is not just basic formatting, either.  There can be lists and other such things in the rich text, so simply parsing the RTF file and setting Bold / Italic / Underline / Font on the Word Document won't work.
0
Comment
Question by:Egore
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 600 total points
ID: 6942260
You need to insert the RTF as a file:

    ChangeFileOpenDirectory "C:\personal\other\testBed\"
    Selection.InsertFile FileName:="p205.rtf", Range:="", ConfirmConversions:= _
        False, Link:=False, Attachment:=False

For example.
0
 
LVL 3

Author Comment

by:Egore
ID: 6942730
That worked extremely well, thanks!  If you hear of a way to do this without having to create a temporary file to store the RTF data first, please let me know.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question