C#: copy Word doc content to new Word doc

is it possible to copy the Word content (including layout) from an existing htmldoc or Worddoc into a new Word doc (with C#)
secuteamersAsked:
Who is Participating?
 
GavinMannionConnect With a Mentor Commented:
I don't have the code with me but you need to utilise the Word API, then select all in the document and then copy it to your clipboard.

Then you can paste from there.

Look for the code some code that utilises the Word API and you should be on your way
0
 
RejojohnyCommented:
if u want to copy all the content then y not just use System.IO to create a copy of the file?

Rejo
0
 
secuteamersAuthor Commented:
i want to copy the content of multiple Word docs into 1 new doc.
0
 
RejojohnyCommented:
u have to use interrop .. add reference to "word" COM in ur project .. declare objects to initialise word.application .. and merfe the documents ..

Rejo
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.