954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

loading a text file into word document

hi all,
i am working on a windows application. In that i have to open a saved text file using a open dialog box and load it into the word document..i am not able to load a text file to word document. what can i do for this?

Thanks in advance

sancti
Light Poster
27 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

How are you trying to insert it?

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 
How are you trying to insert it?

in windows form i have to just a open a saved text file and that contents have to be tranferred to word document and then it is available for print.

sancti
Light Poster
27 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

no, I mean how are you trying to insert it into word? ole? cut and paste? sending keys?

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

hi all, i am working on a windows application. In that i have to open a saved text file using a open dialog box and load it into the word document..i am not able to load a text file to word document. what can i do for this?

Thanks in advance

That sounds like something I had to do for an assignment at University. I had to make an application that allowed the user to create a new document, save, open and close etc.

You may want to look into using the FileStream class

FileStream fs = new FileStream();
fs.DoSomethingHere

I cant remember exactly what the coding is for it ... but hopefully you get the idea ... if its even what you are looking for!

Elmo_loves_you
Junior Poster in Training
85 posts since Mar 2008
Reputation Points: 30
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You