473,792 Members | 3,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to convert rtf to text

Al
Hi
Is there any what to convert content of a richTexBoxt from rtf to text?
thanks
Al
Nov 21 '05 #1
6 20658
Hi,

Doesn't RichTextBox1.Te xt work for you?

Greetz Peter
"Al" <Al@discussions .microsoft.com> wrote in message
news:DE******** *************** ***********@mic rosoft.com...
Hi
Is there any what to convert content of a richTexBoxt from rtf to text?
thanks
Al

Nov 21 '05 #2
Al
No, RichTextBox1.Te xt will be empty eventhough RichTextBox1.rt f is not.

"Peter Proost" wrote:
Hi,

Doesn't RichTextBox1.Te xt work for you?

Greetz Peter
"Al" <Al@discussions .microsoft.com> wrote in message
news:DE******** *************** ***********@mic rosoft.com...
Hi
Is there any what to convert content of a richTexBoxt from rtf to text?
thanks
Al


Nov 21 '05 #3
Sorry If I don't get it but

RichTextBox1.Rt f ==> Gives the text and the formatting characters
RichTextBox1.Te xt ==> Just gives the text in the richtextbox

if you pass a rtf string to the richtextbox.rtf it will only show the text:

for example:
RichTextBox1.Rt f =
"{\rtf1\ansi\an sicpg1252\deff0 \deflang1043{\f onttbl{\f0\fnil \fcharset0 _
Microsoft Sans Serif;}}\viewki nd4\uc1\pard\f0 \fs17 test hallo\par}"

hth

Greetz Peter
"Al" <Al@discussions .microsoft.com> wrote in message
news:2B******** *************** ***********@mic rosoft.com...
No, RichTextBox1.Te xt will be empty eventhough RichTextBox1.rt f is not.

"Peter Proost" wrote:
Hi,

Doesn't RichTextBox1.Te xt work for you?

Greetz Peter
"Al" <Al@discussions .microsoft.com> wrote in message
news:DE******** *************** ***********@mic rosoft.com...
Hi
Is there any what to convert content of a richTexBoxt from rtf to text? thanks
Al


Nov 21 '05 #4
Al
Hi Peter,
sorry for not describing what i want better. Yes richtextbox.rtf showes rtf
string as a text but I need to read a string formated as rtf and then convert
it to text write to a file as text without any formating.
thanks
Al

"Peter Proost" wrote:
Sorry If I don't get it but

RichTextBox1.Rt f ==> Gives the text and the formatting characters
RichTextBox1.Te xt ==> Just gives the text in the richtextbox

if you pass a rtf string to the richtextbox.rtf it will only show the text:

for example:
RichTextBox1.Rt f =
"{\rtf1\ansi\an sicpg1252\deff0 \deflang1043{\f onttbl{\f0\fnil \fcharset0 _
Microsoft Sans Serif;}}\viewki nd4\uc1\pard\f0 \fs17 test hallo\par}"

hth

Greetz Peter
"Al" <Al@discussions .microsoft.com> wrote in message
news:2B******** *************** ***********@mic rosoft.com...
No, RichTextBox1.Te xt will be empty eventhough RichTextBox1.rt f is not.

"Peter Proost" wrote:
Hi,

Doesn't RichTextBox1.Te xt work for you?

Greetz Peter
"Al" <Al@discussions .microsoft.com> wrote in message
news:DE******** *************** ***********@mic rosoft.com...
> Hi
> Is there any what to convert content of a richTexBoxt from rtf to text? > thanks
> Al


Nov 21 '05 #5
Hi Al,

this is what I showed you in the previous post I think,

place a richtextbox and a button on a form then copy paste this code:

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As _
System.EventArg s) Handles Button1.Click
RichTextBox1.Rt f =
"{\rtf1\ansi\an sicpg1252\deff0 \deflang1043{\f onttbl{\f0" & _
"\fnil\fcharset 0 Microsoft Sans Serif;}}\viewki nd4\uc1\pard\f0 \fs17 test
hallo\par}"
Dim objWriter As New StreamWriter("c :\test.txt")
objWriter.Write Line(RichTextBo x1.Text)
objWriter.Close ()
End Sub

I hope this helps you

greetz Peter

"Al" <Al@discussions .microsoft.com> wrote in message
news:34******** *************** ***********@mic rosoft.com...
Hi Peter,
sorry for not describing what i want better. Yes richtextbox.rtf showes rtf string as a text but I need to read a string formated as rtf and then convert it to text write to a file as text without any formating.
thanks
Al

"Peter Proost" wrote:
Sorry If I don't get it but

RichTextBox1.Rt f ==> Gives the text and the formatting characters
RichTextBox1.Te xt ==> Just gives the text in the richtextbox

if you pass a rtf string to the richtextbox.rtf it will only show the text:
for example:
RichTextBox1.Rt f =
"{\rtf1\ansi\an sicpg1252\deff0 \deflang1043{\f onttbl{\f0\fnil \fcharset0 _
Microsoft Sans Serif;}}\viewki nd4\uc1\pard\f0 \fs17 test hallo\par}"

hth

Greetz Peter
"Al" <Al@discussions .microsoft.com> wrote in message
news:2B******** *************** ***********@mic rosoft.com...
No, RichTextBox1.Te xt will be empty eventhough RichTextBox1.rt f is not.
"Peter Proost" wrote:

> Hi,
>
> Doesn't RichTextBox1.Te xt work for you?
>
> Greetz Peter
>
>
> "Al" <Al@discussions .microsoft.com> wrote in message
> news:DE******** *************** ***********@mic rosoft.com...
> > Hi
> > Is there any what to convert content of a richTexBoxt from rtf to

text?
> > thanks
> > Al
>
>
>


Nov 21 '05 #6
Al
Thanks Peter

"Peter Proost" wrote:
Hi Al,

this is what I showed you in the previous post I think,

place a richtextbox and a button on a form then copy paste this code:

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As _
System.EventArg s) Handles Button1.Click
RichTextBox1.Rt f =
"{\rtf1\ansi\an sicpg1252\deff0 \deflang1043{\f onttbl{\f0" & _
"\fnil\fcharset 0 Microsoft Sans Serif;}}\viewki nd4\uc1\pard\f0 \fs17 test
hallo\par}"
Dim objWriter As New StreamWriter("c :\test.txt")
objWriter.Write Line(RichTextBo x1.Text)
objWriter.Close ()
End Sub

I hope this helps you

greetz Peter

"Al" <Al@discussions .microsoft.com> wrote in message
news:34******** *************** ***********@mic rosoft.com...
Hi Peter,
sorry for not describing what i want better. Yes richtextbox.rtf showes

rtf
string as a text but I need to read a string formated as rtf and then

convert
it to text write to a file as text without any formating.
thanks
Al

"Peter Proost" wrote:
Sorry If I don't get it but

RichTextBox1.Rt f ==> Gives the text and the formatting characters
RichTextBox1.Te xt ==> Just gives the text in the richtextbox

if you pass a rtf string to the richtextbox.rtf it will only show the text:
for example:
RichTextBox1.Rt f =
"{\rtf1\ansi\an sicpg1252\deff0 \deflang1043{\f onttbl{\f0\fnil \fcharset0 _
Microsoft Sans Serif;}}\viewki nd4\uc1\pard\f0 \fs17 test hallo\par}"

hth

Greetz Peter
"Al" <Al@discussions .microsoft.com> wrote in message
news:2B******** *************** ***********@mic rosoft.com...
> No, RichTextBox1.Te xt will be empty eventhough RichTextBox1.rt f is not. >
> "Peter Proost" wrote:
>
> > Hi,
> >
> > Doesn't RichTextBox1.Te xt work for you?
> >
> > Greetz Peter
> >
> >
> > "Al" <Al@discussions .microsoft.com> wrote in message
> > news:DE******** *************** ***********@mic rosoft.com...
> > > Hi
> > > Is there any what to convert content of a richTexBoxt from rtf to
text?
> > > thanks
> > > Al
> >
> >
> >


Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7775
by: hunterb | last post by:
I have a file which has no BOM and contains mostly single byte chars. There are numerous double byte chars (Japanese) which appear throughout. I need to take the resulting Unicode and store it in a DB and display it onscreen. No matter which way I open the file, convert it to Unicode/leave it as is or what ever, I see all single bytes ok, but double bytes become 2 seperate single bytes. Surely there is an easy way to convert these mixed...
3
10295
by: Convert TextBox.Text to Int32 Problem | last post by:
Need a little help here. I saw some related posts, so here goes... I have some textboxes which are designed for the user to enter a integer value. In "old school C" we just used the atoi function and there you have it. So I enquired and found the Convert class with it's promising ToInt32 method, great... but it doesn't work. The thing keeps throwing Format Exceptions all over the place. What is the "C#" way to do this??? code int wmin,...
4
49652
by: Serge Klokov | last post by:
Hello! I have a Oracle table with a BLOB field. Each field is actually a simple text file of several lines. How to get this BLOB fields in readable format? I tryied something like row.ToString() But it give result "System.Byte" instead of actual text...
3
52532
by: Jan Eliasen | last post by:
Hi I have a string, which I must convert into another string and have it utf-8 encoded. My current code looks like this; Both vDataIn and vDataOut are Objects (parameters to a function-call), and vDataIn contains a string, and that is also what vDataOut must contain when I am done.
10
8108
by: Nikolay Petrov | last post by:
How can I convert DOS cyrillic text to Unicode
5
9652
by: Socrates | last post by:
I am interested in developing an online utility that will enable users to copy and past any image (or upload any image on the internet) to the online utility, which will then convert the image to text. The user may "convert image to text" and copy and paste the text displayed into any word document, or send the text displayed to the recipient's email address or can download the text file as a zipped text file that will be presented to...
4
4524
by: Edwin Knoppert | last post by:
In my code i use the text from a textbox and convert it to a double value. I was using Convert.ToDouble() but i'm used to convert comma to dot. This way i can assure the text is correct. However it seems this convert is determined by the local settings and comma is indeed used as decimal separator. Is there another way to convert a dotted value to a double variable? Like 1234.5 and not 1234,5
27
5155
by: comp.lang.tcl | last post by:
My TCL proc, XML_GET_ALL_ELEMENT_ATTRS, is supposed to convert an XML file into a TCL list as follows: attr1 {val1} attr2 {val2} ... attrN {valN} This is the TCL code that does this: set contents ]; close $fileID
3
8751
by: mrajanikrishna | last post by:
Hi Friends, I am accepting a number from the user entered in a textbox. I want to assign to a variable in my code and assignt this to that variable. double num1 = (double)txtNum1.text; this produced an error
0
10785
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
9670
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10159
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3719
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.