Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

Q: RichEditControl.text -> Word.document...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Visual Systems AB \(Martin Arvidsson\) - 23 Nov 2004 20:14 GMT
Hi!

I have a richedit on my winapp, i want to transfer the text and the format
of the text to the word document i created. But only the text is transfered,
but not the formatting...

Any ideas...

Regards

Martin
Anushi - 25 Nov 2004 12:49 GMT
Hi Martin,

Try the SaveFile method of RichTextBox class. It enables you to save the
entire contents of the control to an RTF file that can be used by other
programs such as Microsoft Word and Windows WordPad. Look here for details :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemwindowsformsrichtextboxclasssavefiletopic3.asp


If you are using VB6, use the TextRTF property of the RichTextBox control to
save the contents as an RTF file. From MSDN :
This example saves the entire contents of a RichTextBox control to an .rtf
file. To try this example, put a RichTextBox control and a CommandButton
control on a form. Paste this code into the Click event of the CommandButton
control. Then run the example.

Private Sub Command1_Click ()
  Open "mytext.rtf" For Output As 1
  Print #1, RichTextBox1.TextRTF
  Close 1

End Sub
HTH,
Anushi

"Visual Systems AB (Martin Arvidsson)" <martin.arvidsson@vsab.net> wrote in
message news:%23nd%235mZ0EHA.3744@TK2MSFTNGP10.phx.gbl...
> Hi!
>
[quoted text clipped - 7 lines]
>
> Martin

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.