I am using this function to convert the contents of my richtextbox to html: Public Function myRTF_To_HTML(ByVal sRTF As String) As String Dim MyWord As Microsoft.Office.Interop.Word.Application Dim oDoNotSaveChanges As Object = Microsoft.Office.Interop.Word.WdSaveOptions.wdDoNotSaveChanges Dim sReturnString As String = "" Dim sConvertedString As String = "" Try MyWord = CreateObject("Word.application") MyWord.Visible = False MyWord.Documents.Add() Dim doRTF As New System.Windows.Forms.DataObject doRTF.SetData("Rich Text Format", sRTF) Clipboard.SetDataObject(doRTF) MyWord.Windows(1).Selection.Paste() MyWord.Windows(1).Selection.WholeStory() MyWord.Windows(1).Selection.Copy() sConvertedString = Clipboard.GetData(System.Windows.Forms.DataFormats.Html) 'Remove some leading text that shows up in the email sConvertedString = sConvertedString.Substring(sConvertedString.IndexOf("<html")) 'Also remove multiple  characters that somehow got inserted sConvertedString = sConvertedString.Replace("Â", "") sReturnString = sConvertedString If Not MyWord …

Member Avatar
Member Avatar
+0 forum 3

I recently started to learn rich text format and i am encountering a bizarre behavior. Here is the code: private void button2_Click_1(object sender, EventArgs e) { s = richTextBox1.Rtf; s = s.Insert(s.IndexOf("colortbl ;") + 10, @"\red0\green255\blue0;\red128\green0\blue0;\red128\green128\blue0;"); LockWindowUpdate(richTextBox1.Handle); string t = @"{\cf3 test }"; s = s.Insert(s.IndexOf("int") + 3, t); //insert it, for example, after the word "int" richTextBox1.Rtf = s; richTextBox1.SelectionStart = richTextBox1.Text.Length; LockWindowUpdate(IntPtr.Zero); } The rtf of the richtextbox before editing is: {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Consolas;}} {\colortbl ;\red0\green255\blue0;} \viewkind4\uc1\pard\cf1\lang1033\f0\fs20 This line is an int\line This line is an int \line This line is an int \par } Every time I insert …

Member Avatar
Member Avatar
+0 forum 1

When formatted text is pasted from MSWord to a TRichEdit control, the bullets are well formatted (on the display) but after; Fetching the rtf data from the TRichEdit control using TStringStream, Saving the stream's DataString to a database and then Loading the saved rtf string back to the TRichEdit control The bullets are being formatted as fullstops Using Delphi 7, Windows xp, msftedit.dll for RichEdit Please assist

Member Avatar
Member Avatar
+0 forum 4

Hi, I want to know how to replace variables of RTF file using PHP language. Please help me....

Member Avatar
Member Avatar
+0 forum 12

I have two RichTextBoxes in my vb.net application (rtf1 & rtf2). rtf1 is loaded with the external data. Mostly It contains para split into different sections. The paragraph is a dynamic data, hence the no. of words keep on changing. Now my question is that, I want to select a para from the cluster, copy it and paste it into rtf2. Manually I did as, Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Rtf1.Copy() Rtf2.Paste() Clipboard.Clear() End Sub Then I added brackets to the para contents as: [para content goes here is a multiline] Rtf1.Select(Index, Length) …

Member Avatar
Member Avatar
+0 forum 7

am trying to add images to a rtf document. I am able to add images to the document but I can't append any images. This means that when the 2nd Image is added, the first image is removed. I think that whenever the code is executed a new rtf document is created. public class InsertToWord { com.lowagie.text.Document doc = null; FileOutputStream evidenceDocument; String fileName = "evidenceDocument.rtf"; settings obj = null; InsertToWord() { obj = new settings(); doc = new com.lowagie.text.Document(); } public void insertImage(File saveLocation) { try { evidenceDocument = new FileOutputStream(obj.getFileLocation()+fileName); RtfWriter2.getInstance(doc, evidenceDocument); doc.open(); com.lowagie.text.Image image = com.lowagie.text.Image.getInstance(saveLocation.toString()); image.scaleAbsolute(400, …

Member Avatar
Member Avatar
+0 forum 6

I have found out that myAppointment.RTFBody appeared with Outlook 2010. The problem is that I don't know how to use it. I copied an example from http://msdn.microsoft.com/en-us/library/aa287595(v=vs.71).aspx myAppointment.RTFBody = @"{\rtf1\ansi This is in \b bold\b0.}"; unfortunately whatever I put after myAppointment.RTFBody, I receive an error: System.Runtime.InteropServices.COMException (0xB9B0FFFF): The operation failed. Can yo please help me with creating proper appointment with BOLD text in it? THX in advance.

Member Avatar
Member Avatar
+0 forum 3

i am curious to know if any one else has used this software... EasyByte RTF to HTML [url]http://www.easybyte.com/products/rtf2html.html[/url] i have tried sending them an email, but yet to receive a reply. I even bought the software as i really need a RTF to HTML dll component; it said wait 24 hrs for your order, but still have not received any emails or my software :/ ( no money has been taken out of my account either).. if not, are there any other companies that offer this product?.. besides SautinSoft! Thanks alot.

Member Avatar
Member Avatar
+0 forum 1

Hi, I need to write very simple RTF parser to write and read basic rtf (bold,italic, underline, paragraph et al). I have searched for techniques I can implement but havent found good example. I would like to hear from you guys what approach whatsoever you consider to be best for you. Thanks!

Member Avatar
Member Avatar
+0 forum 9

can someone tell me how to do this... I have a page that contains reports and information. For this reason, I thought of putting an rtf generator that converts HTML to RTF. I've googled it, found some codes, but I cant understand... Any one here know how to do it? I also found this: [url]http://www.phpclasses.org/package/1805-PHP-Create-RTF-documents-from-HTML.html[/url] I downloaded it, try to run it in my localhost. I generates rtf but I can see the connection of html here... help me pls. thankyou!

Member Avatar
Member Avatar
+0 forum 2

Hello everyone, I am trying to read a .rtf file, does this have to be done using the RTFeditorKit? Can a .rtf file be read line by line like a normal .txt file, as I was planning to read it line by line (as a string) to remove punctuation first by using a regex. I did find some examples on the RTFeditor but I ' m not sure what it is used for and I didn't understand them, or if I should use something else. Any help would be greatly appreciated.

Member Avatar
+0 forum 0

Hi, Is there any way I can add a footer to rtf with name, page no. and date using c# and word tags? Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi, in my project i am creating a rtf file using xx.save(considering xx is the name of file), now when i try to load the same file using xx.load it opens the file in rtf box it loads the file successfully but prints few unwanted information too. a sample what is being loaded is: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial Black;}} \viewkind4\uc1\pard\b\i\f0\fs23 hey hi how are you\par } My content is only "Hey how are you". Rest all is unwanted. If i am not wrong it is the header information that is displayed along with. I dont want this extra info. How to remove …

Member Avatar
Member Avatar
+0 forum 3

The End.