?
Solved

How to save richTextBox contents to .doc file?

Posted on 2009-04-14
12
Medium Priority
?
1,129 Views
Last Modified: 2012-05-06
Anyone please tell me how to save all contents of richTextBox to .doc files without changing format.

Thanks!
0
Comment
Question by:Mr_Bach
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +1
12 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24136691
You can do it the same way you save it as RTF file, just rename it. Word will understand the RTF format is used and will show the correct format.
0
 
LVL 39

Expert Comment

by:abel
ID: 24136701
Note that this is considered bad practice, however, and it is better to just save it as RTF file (i.e, like in xxxyyyzzz.rtf) which will automatically open with Word if Word is installed.
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24136989
well as per my opinion you should save it in .RTF only as there are few ways to save it in .DOC but it will need office library to installed in your application which will create burden on your application so I would insist you to save it as RTF and open it in word.

Do you have any special requirement to save it as DOC? if so than we can probably find out solution to it as a workaround or permanent

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Expert Comment

by:RiteshShah
ID: 24137060
coagantus, I am sorry both the links you provided doesn't seem relevant for author's case.
0
 

Author Comment

by:Mr_Bach
ID: 24137282
I am so sorry, so how to save to .RTF?

0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24137336
are you using any 3rd party rich text box?
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24137389
BTW, this link could be helpful.

http://forums.asp.net/t/1260657.aspx

http://www.experts-exchange.com/Programming/Languages/.NET/Class_Libraries/Windows_Forms/Q_23235545.html


if you want to get good RTF control and save the file from it than go for below link.
http://freetextbox.com/default.aspx
0
 
LVL 39

Expert Comment

by:abel
ID: 24137437
> I am so sorry, so how to save to .RTF?

what about:

RichTextBox1.SaveFile("mypath.rtf")
0
 
LVL 39

Accepted Solution

by:
abel earned 1500 total points
ID: 24137442
or, more specifically:

   RichTextBox1.SaveFile("mypath.rtf", RichTextBoxStreamType.RichText)

-- Abel --
0
 

Author Comment

by:Mr_Bach
ID: 24137501
Thanks Mr. Abel ! I got it.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question