Function to convert rtf to plain text (VBA)

February 12th, 2012 - 03:43 pm ET by Jans | Report spam
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
email Follow the discussionReplies 3 repliesReplies Make a reply

Similar topics

Replies

#1 Stefan Blom
February 18th, 2012 - 02:53 pm ET | Report spam
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
news:

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
Replies Reply to this message
#2 Jans
February 23rd, 2012 - 01:16 pm ET | Report spam
On 18 feb, 20:53, "Stefan Blom"
wrote:
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

news:

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?
Replies Reply to this message
#3 Stefan Blom
February 23rd, 2012 - 06:19 pm ET | Report spam
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
news:

On 18 feb, 20:53, "Stefan Blom"
wrote:
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

news:

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?
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search