# RTF to TEXT from console app

**URL:** <https://ifnotnil.com/t/rtf-to-text-from-console-app/476>\
**Category:** General Programming\
**Created:** [16 May 2020 00:27 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476 "2020-05-16T00:27:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpeedLimitChallenger](https://ifnotnil.com/user_avatar/ifnotnil.com/speedlimitchallenger/32/432_2.png) [@SpeedLimitChallenger](https://ifnotnil.com/u/SpeedLimitChallenger)\
**Post date:** [16 May 2020 00:27 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/1 "2020-05-16T00:27:06Z")

</div>

I have a few RTF documents that I want to convert to text. I see from the docs that StyledText has RTFData, but looks like this is associated to TextArea.

is it possible to convert RTF to Text file from console app?

---

<div class="post-metadata">

**Author:** ![Tim](https://ifnotnil.com/user_avatar/ifnotnil.com/tim/32/13_2.png) [@Tim](https://ifnotnil.com/u/Tim)\
**Post date:** [16 May 2020 00:43 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/2 "2020-05-16T00:43:45Z")

</div>

You may be misunderstanding the documentation. `TextArea` does have a StyledText property, but the `StyledText` class is not directly tied to it. You can use the `StyledText` class in a Console app.

---

<div class="post-metadata">

**Author:** ![SpeedLimitChallenger](https://ifnotnil.com/user_avatar/ifnotnil.com/speedlimitchallenger/32/432_2.png) [@SpeedLimitChallenger](https://ifnotnil.com/u/SpeedLimitChallenger)\
**Post date:** [16 May 2020 00:50 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/3 "2020-05-16T00:50:05Z")

</div>

thank you tim. you are correct, I misread it.

now, I am getting a funky error:

```
var s as string = rs.Column("RTFTEXT").StringValue
var ts as new StyledText
ts.RTFData = s

```

when I try to run, I get an error stating that “StyledText” has no member named “RTFData”

---

<div class="post-metadata">

**Author:** ![Tim](https://ifnotnil.com/user_avatar/ifnotnil.com/tim/32/13_2.png) [@Tim](https://ifnotnil.com/u/Tim)\
**Post date:** [16 May 2020 00:55 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/4 "2020-05-16T00:55:03Z")

</div>

Harr, maybe I’m wrong. That’s always fun 🙂

---

<div class="post-metadata">

**Author:** ![SpeedLimitChallenger](https://ifnotnil.com/user_avatar/ifnotnil.com/speedlimitchallenger/32/432_2.png) [@SpeedLimitChallenger](https://ifnotnil.com/u/SpeedLimitChallenger)\
**Post date:** [16 May 2020 01:05 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/5 "2020-05-16T01:05:45Z")

</div>

MBS to the rescue!

just added there Util plugin, and I am now able to get around the issue.

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [16 May 2020 03:56 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/6 "2020-05-16T03:56:33Z")

</div>

The CONSOLE version of StyledText does indeed not have RTFData

---

<div class="post-metadata">

**Author:** ![Tim](https://ifnotnil.com/user_avatar/ifnotnil.com/tim/32/13_2.png) [@Tim](https://ifnotnil.com/u/Tim)\
**Post date:** [16 May 2020 04:08 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/7 "2020-05-16T04:08:35Z")

</div>

There’s a teeny-tiny little inaccurate note on the documentation that suggested otherwise " Supported for all project types and targets." 😕

Good thing for MBS!

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [16 May 2020 16:30 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/8 "2020-05-16T16:30:31Z")

</div>

Bug report time as its definitely not there  
I’ve checked several avenues and it definitely isnt there in a Console app  
Either its a documentation bug about RTF or that its just isnt present in Console

---

<div class="post-metadata">

**Author:** ![SpeedLimitChallenger](https://ifnotnil.com/user_avatar/ifnotnil.com/speedlimitchallenger/32/432_2.png) [@SpeedLimitChallenger](https://ifnotnil.com/u/SpeedLimitChallenger)\
**Post date:** [16 May 2020 16:34 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/9 "2020-05-16T16:34:22Z")

</div>

the interesting part is, auto-complete allows you to fill out StyledText.RTFData from console

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [16 May 2020 16:40 UTC](https://ifnotnil.com/t/rtf-to-text-from-console-app/476/10 "2020-05-16T16:40:15Z")

</div>

Yeah  
Thats a shortcoming of how autocomplete works ☹
