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

Home Posts Topics Members FAQ

edit richtextbox with word

Suppose I have a .Net C# Winforms App with a RichTextBox control and I want
to provide an option for the user
to open the Rtf in Word, edit it in Word and get the edited value back to my
C# app dynamically (not with an external file).

Where should I start? Is there a document explaining this?
I read msdn but I did not see exactly what I am looking for

thanks,

Ludovic SOEUR
Nov 16 '05 #1
2 6028
Open Word from your application (there are plenty of resources on how to do
this)
You can insert the text from the richtextbox by using
wordApp.Selecti on.TypeText(ric hTextBox1.Text) ; (wordApp being the Microsoft
Word Application object) (side note: this is a good read:
http://blogs.msdn.com/ptorr/archive/.../05/67872.aspx)

Add a event Handler that fires some code when the document is closed (I
think its wordApp.Documen tBeforeClose)
clear your original rich text box..grab the range from the document and set
the richtextbox's text to the range.Text.
"Ludovic SOEUR" <Lu***********@ hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Suppose I have a .Net C# Winforms App with a RichTextBox control and I
want
to provide an option for the user
to open the Rtf in Word, edit it in Word and get the edited value back to
my
C# app dynamically (not with an external file).

Where should I start? Is there a document explaining this?
I read msdn but I did not see exactly what I am looking for

thanks,

Ludovic SOEUR

Nov 16 '05 #2
Thanks for the link but it still does not answer to my problem...how can I
keep rtf format from my RichTextBox to Word, to do changes in Word and then
to "update" my RichTextBox with the new rtf stream ?

Thanks,

Ludovic Soeur.

"Kunal Das" <kunal[at]RemoveThis.qnal .net> a écrit dans le message de
news:uG******** ******@TK2MSFTN GP14.phx.gbl...
Open Word from your application (there are plenty of resources on how to do this)
You can insert the text from the richtextbox by using
wordApp.Selecti on.TypeText(ric hTextBox1.Text) ; (wordApp being the Microsoft Word Application object) (side note: this is a good read:
http://blogs.msdn.com/ptorr/archive/.../05/67872.aspx)

Add a event Handler that fires some code when the document is closed (I
think its wordApp.Documen tBeforeClose)
clear your original rich text box..grab the range from the document and set the richtextbox's text to the range.Text.
"Ludovic SOEUR" <Lu***********@ hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Suppose I have a .Net C# Winforms App with a RichTextBox control and I
want
to provide an option for the user
to open the Rtf in Word, edit it in Word and get the edited value back to my
C# app dynamically (not with an external file).

Where should I start? Is there a document explaining this?
I read msdn but I did not see exactly what I am looking for

thanks,

Ludovic SOEUR


Nov 16 '05 #3

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

Similar topics

0
3252
by: nouno | last post by:
I am trying to spell check a richtextbox. Through code (shown below) I save the contents of the richtextbox to a rtf file, open the rtf file in Word, spell check it, save it, and then load the ftf file back into the ricktextbox using loadfile. The problem is that the richtextbox seems to remain bound to the rtf file. If I make a change in the richtextbox after spell checking, the changes are successfully saved to the database but if the...
0
4557
by: JMe9ka | last post by:
I'm looking to export data from my application into a document. The data represented needs to be shown in a table (like a table within a Word document). I am currently using Word automation to push data into tables within a Word document, however I would like to move away from the Word dependency this creates. Is there a good way to go about creating tables in a RichTextBox control? I had thought that this would involve creating the...
0
2758
by: Sakharam Phapale | last post by:
Hi All, I am developing my own text editor using RichTextBox control. I don't want to use RichTextBox Undo and Redo functions. Instead of that I want to develop my own algorithm for Undo & Redo, as my application demands it. Because for each word in text, I have associated data and so, require to maintain state of associated data also. Currently, I have developed algorithm which works on each key press. On each key press event, I...
3
8726
by: sss024 | last post by:
Word document viewing in RichTextBox control
6
7143
by: andreas | last post by:
A selected text has fontstyles like bold and italic and underscore I want to remove one of them without changing the other fontstyles. How to do that? Thanks for any response
0
1589
by: Lou | last post by:
Dear all, I have two questions and need to get some hints from u. :0) 1. Editor with the syntax functionality. In my ongoing editor, when the user types the word, e.g. "ABC", the word "ABC" will appear in the RichTextBox with the changed color red. Afterwards, when the furhter action is taking on, e.g. user gives the input directly in the RichTextBox or types the other word, the color
0
937
by: chris | last post by:
i use RichTextBox to develop a simple notepad, now i want to implement a function: when click on a word, the font name and size of the word will be displayed in statusbar. i know the SelectionFont can get the font of the current text selection or insertion point. but i find it always retrieves the RichTextBox's font, not current word's font. i don't know why? can anyone know what's the probem?
1
1714
by: bmerlover | last post by:
I'm having trouble reading quotations inside the richTextBox when a file is opened on to it. I've tried a couple different methods, most of them didn't compile. I came across one that does compile and supposedly it's suppose to work but it doesn't in my case. I tried this code to see if it would recognize the quotations. For testing purpose I wanted to see if it would start the string from the quotation. str =...
4
2061
by: nmilne | last post by:
be soft this is my first post here I have a problem with the richtextbox.rtf code when I run my program And move to the next record then move back: (this is how the data looks before richtextbox.rtf before it changes it): \pard \fi-360 \li360 \sb80 \sa40 \f2 \cf2 \'e0\'e1\cf0 \f0 (Aramaic)\par \b0 \f3 'ab\cf0 \f0 \par \pard \sa60 \b1 BDB Definition:\b0 \par \pard \fi-360 \li360 \sa60 1) father\par \pard \sb60 \sa60 \b1 Part 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,...
0
9033
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
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
6776
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
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...
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
3
2917
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.