Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1307
  • Last Modified:

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#)
0
secuteamers
Asked:
secuteamers
  • 2
1 Solution
 
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
 
GavinMannionCommented:
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:
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now