473,748 Members | 3,823 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

convert rtf to plain text

15 New Member
How can I convert rtf format to plain text format in Visual Studio 2005 using VB.net 2.0?

rtf sample: {\rtf1\ansi\ans icpg950\deff0\d eflang1033\defl angfe1028{\font tbl{\f0\fnil\fc harset0 Arial;}} \viewkind4\uc1\ pard\lang1028\f s24 gffjdyjkghjkj\p ar }

Please help, THX!
Sep 13 '07 #1
1 6181
Plater
7,872 Recognized Expert Expert
Create an instance of the RichTextBox class.
RichTextBox myrtb=new RichTextBox();

Then assign the rtf string

myrtb.RTF=RTFSt ring;

Then get the plain text string:
string plaintext=myrtb .Text;
Sep 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
12947
by: rob.kellington at gmail | last post by:
Does anyone have the logic to convert RTF formatted data in a text column into plain ascii text that I can use in a varchar variable or field? We have an app that allows formatted comments/notes to be stored in a SQL 2000 text column. Ideally, I would like a trigger that would copy any inserted comments into a seperate table, varchar field so that these are viewable in other apps that can not display formatted RTF. I would really...
4
17855
by: Ted | last post by:
I have a SQL Server 2000 table with a few fields of "text" data type that contain rich text. I have to downstream this data and the recipient cannot handle rich text. I need to figure out a way to convert it back to plain text. Any suggetions? TIA
4
2389
by: Nedo | last post by:
hi is there a simple way to convert a html-string to a plain text-string? thanks Nedo
1
1989
by: Dave | last post by:
Greetings, Is anybody aware of any code that will allow me to read .rtf or .doc or .pdf or .htm as plain text (so I can do a streamreader off them). Thanks, -Dave
6
7092
by: Joerg Battermann | last post by:
Hey there, mmmm does anyone know a library or anything I can use to convert plaintext to html real quick and vice-versa? Regex surely would do the trick to a certain level, but maybe there's already a useful library out there which I might have a look at.. Thanks, -J
6
8654
by: Justin | last post by:
Hi all, i need some help over here... i found the solution to export file from mysql db into *.csv. but is there anyway to convert the contents into *.doc and save in my webserver and providing a link for the end users to download the word file? FYI, the database records are obtained by end users submitting the forms themselve and i saved it in my db... Thanx.
3
1747
by: Vlad | last post by:
Hi! My task: Take HTML -convert into plain text. Sub-task: 1. Find all urls within HTML (<a href="http://www.abc.com">More about baby bears</a>). 2. And convert them into plain text: More about baby brears (http:// www.abc.com)
8
6203
by: geoffbache | last post by:
I have some marked up text and would like to convert it to plain text, by simply removing all the tags. Of course I can do it from first principles but I felt that among all Python's markup tools there must be something that would do this simply, without having to create an XML parser etc. I've looked around a bit but failed to find anything, any tips? (e.g. convert "<B>Today</Bis <U>Friday</U>" to "Today is Friday")
0
1353
by: peridian | last post by:
Hi, Can I do a bulk "find and replace" on data in SQL Server to convert character set data? I have data coming in from multiple external sources. That data is not always in UTF-8 or ASCII character sets, but that's okay internal to the database, as it has to remain in the source's local format. Every month I run a query to select data out of the database, put it into a temporary export table, then dump it out to a plain text file. ...
0
1482
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I need to convert doc, xls, pdf, rtf to plain Text. It should work like: string s = ConvertToText(@"C:\temp\text.doc"); What is the best component to use ?? Thanks for any comments. Best regards
0
8991
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
8830
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
9370
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...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4602
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...
1
3312
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

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.