Function to convert rtf to plain text (VBA)

J

Jans

Hi there,

I would like to place text into a textbox. I read a rtf file. Is there
a function to convert the rtf to plain text?

I dont want to use the richtextbox control.

Thanx
 
S

Stefan Blom

Well, since Word can open RTF files, you can use Word's SaveAs method to
convert it into plain text format.

What kind of text box are you referring to? A Word text box? Or a text form
field?

-- 
Stefan Blom
Microsoft Word MVP




---------------------------------------------
"Jans" wrote in message

Hi there,

I would like to place text into a textbox. I read a rtf file. Is there
a function to convert the rtf to plain text?

I dont want to use the richtextbox control.

Thanx
 
J

Jans

Well, since Word can open RTF files, you can use Word's SaveAs method to
convert it into plain text format.

What kind of text box are you referring to? A Word text box? Or a text form
field?

--
Stefan Blom
Microsoft Word MVP

---------------------------------------------"Jans"  wrote in message


Hi there,

I would like to place text into a textbox. I read a rtf file. Is there
a function to convert the rtf to plain text?

I dont want to use the richtextbox control.

Thanx

I don't want to open the file in word, it takes to long, is there a
vba function to convert te rtf text to plain text?
 
S

Stefan Blom

With VBA, I don't see a way to extract data from a file without opening it
first. You may need a different approach. If, somehow, you can copy the RTF
file content to the clipboard, pasting in plain text format (via VBA) could
be done, of course.

-- 
Stefan Blom
Microsoft Word MVP




---------------------------------------------
"Jans" wrote in message

Well, since Word can open RTF files, you can use Word's SaveAs method to
convert it into plain text format.

What kind of text box are you referring to? A Word text box? Or a text
form
field?

--
Stefan Blom
Microsoft Word MVP

---------------------------------------------"Jans" wrote in message


Hi there,

I would like to place text into a textbox. I read a rtf file. Is there
a function to convert the rtf to plain text?

I dont want to use the richtextbox control.

Thanx

I don't want to open the file in word, it takes to long, is there a
vba function to convert te rtf text to plain text?
 

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