Code to importing Docx file

General TRichView support forum. Please post your questions here
Post Reply
hamden
Posts: 6
Joined: Sat Oct 25, 2008 7:40 pm
Location: Brasil
Contact:

Code to importing Docx file

Post by hamden »

Hello;
I would like to know if there´s a sample code or snippet code (or a demo) of importing DOCX file to a TRichView (or TScaleRichView) component.

Best regards;
Hamden Vogel
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Code to importing Docx file

Post by Sergey Tkachenko »

The simplest application:

For TRichView

Place RichView1: TRichView (or TRichViewEdit) on a form.
Place RVStyle1: TRVStyle on a form.
Assign RichView1.Style := RVStyle1.

Call:

Code: Select all

RichView1.Clear;
RichView1.LoadDocX(FileName);
RichView1.Format;
For ScaleRichView

Place SRichViewEdit1: TSRichViewEdit on a form.
Call:

Code: Select all

SRichViewEdit1.Clear;
SRichViewEdit1.RichViewEdit.LoadDocX(FileName);
SRichViewEdit1.Format;
Post Reply