1,105,286 Community Members

loading a text file into word document

Member Avatar
sancti
Light Poster
27 posts since Aug 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
LizR
Posting Virtuoso
1,735 posts since Aug 2008
Reputation Points: 171 [?]
Q&As Helped to Solve: 190 [?]
Skill Endorsements: 4 [?]
 
0
 

How are you trying to insert it?

Member Avatar
sancti
Light Poster
27 posts since Aug 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Member Avatar
LizR
Posting Virtuoso
1,735 posts since Aug 2008
Reputation Points: 171 [?]
Q&As Helped to Solve: 190 [?]
Skill Endorsements: 4 [?]
 
0
 

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

Member Avatar
Elmo_loves_you
Junior Poster in Training
86 posts since Mar 2008
Reputation Points: 20 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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!

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article