Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
GeneralMessage Queues & Service Pin
Dpriya27-Jan-04 2:21
Dpriya27-Jan-04 2:21 
GeneralRe: Message Queues & Service Pin
Heath Stewart27-Jan-04 4:32
protectorHeath Stewart27-Jan-04 4:32 
GeneralEnable scroll wheel in a panel Pin
Jonathan Slenders_27-Jan-04 0:37
sussJonathan Slenders_27-Jan-04 0:37 
GeneralRe: Enable scroll wheel in a panel Pin
Heath Stewart27-Jan-04 4:28
protectorHeath Stewart27-Jan-04 4:28 
GeneralRe: Enable scroll wheel in a panel Pin
J. Dunlap27-Jan-04 5:31
J. Dunlap27-Jan-04 5:31 
GeneralAutomating word documents from C# Pin
Marix27-Jan-04 0:06
Marix27-Jan-04 0:06 
GeneralRe: Automating word documents from C# Pin
Mazdak27-Jan-04 1:59
Mazdak27-Jan-04 1:59 
GeneralRe: Automating word documents from C# Pin
Heath Stewart27-Jan-04 4:24
protectorHeath Stewart27-Jan-04 4:24 
If this is only RTF, you could use System.Text.Encoding.ASCII or System.Text.Encoding.Unicode (depending on how the RTF is stored) to convert to byte[] array to text and assign it to the RichTextBox.Rtf property.

If you need to use Word instead, you'll have to save this to a temporary file. The only way to load a stream is with a structured storage document, which RTF isn't (only compound documents like Word Documents are). Since you would be using the Office PIAs, however, you'll have to create an instance of Word.Application. Since you have that reference, you can attach events to know when the application is closed, or even if a document is closed. In this event handler, you can delete the temporary file.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Automating word documents from C# Pin
Marix27-Jan-04 23:16
Marix27-Jan-04 23:16 
Generale-mail files Pin
Kenneth_i26-Jan-04 23:06
Kenneth_i26-Jan-04 23:06 
GeneralRe: e-mail files Pin
Dmitriy Kostovetskiy27-Jan-04 0:30
Dmitriy Kostovetskiy27-Jan-04 0:30 
GeneralRe: e-mail files Pin
JonathanSlenders27-Jan-04 0:42
sussJonathanSlenders27-Jan-04 0:42 
GeneralRe: e-mail files Pin
Mazdak27-Jan-04 1:54
Mazdak27-Jan-04 1:54 
GeneralRe: e-mail files Pin
Kenneth_i27-Jan-04 2:09
Kenneth_i27-Jan-04 2:09 
GeneralRe: e-mail files Pin
Kenneth_i27-Jan-04 2:07
Kenneth_i27-Jan-04 2:07 
GeneralRe: e-mail files Pin
Kenneth_i27-Jan-04 2:05
Kenneth_i27-Jan-04 2:05 
GeneralRe: e-mail files Pin
Heath Stewart27-Jan-04 4:04
protectorHeath Stewart27-Jan-04 4:04 
GeneralRe: e-mail files Pin
Kenneth_i27-Jan-04 14:08
Kenneth_i27-Jan-04 14:08 
GeneralClass Inheritance Pin
Gareth_Hastings26-Jan-04 22:49
Gareth_Hastings26-Jan-04 22:49 
GeneralRe: Class Inheritance Pin
Dmitriy Kostovetskiy26-Jan-04 23:28
Dmitriy Kostovetskiy26-Jan-04 23:28 
GeneralRe: Class Inheritance Pin
Nick Parker27-Jan-04 7:05
protectorNick Parker27-Jan-04 7:05 
GeneralSelect node in a TreeView Pin
thomasa26-Jan-04 22:31
thomasa26-Jan-04 22:31 
GeneralRe: Select node in a TreeView Pin
Heath Stewart27-Jan-04 3:40
protectorHeath Stewart27-Jan-04 3:40 
GeneralRe: Select node in a TreeView Pin
Uwe Keim28-Jan-04 3:09
sitebuilderUwe Keim28-Jan-04 3:09 
GeneralRe: Select node in a TreeView Pin
Heath Stewart28-Jan-04 5:38
protectorHeath Stewart28-Jan-04 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.