Click here to Skip to main content
15,881,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,guys

I'd like a word document inside the 25 to 45 the Range, inside which the data is added to another document? The Range There may be pictures or tables, it is not the way a string is added to another document. The following method can meet the requirement, but if the client during the program, use the clipboard, the program to run is not normal:
Application app=new Application();
Document doc1,doc2;
doc1=app.Documents.Open(...);
doc2=app.Documents.Open(...);
doc1.Activate();
object start=25,end=45;
doc1.Range(ref start, ref end).Copy();
doc2.Activate();
start=1;
doc2.Range(ref start, ref start).Paste();
Posted
Updated 8-Feb-11 20:52pm
v6

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900