Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
I want extract Range(25,45) of "doc1",and add to "doc2",don't use clipboard.

if I use clipboard when the software is running,this software will fail.

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

1 solution

See here[^].
 
Share this answer
 
Comments
whoyousee 9-Feb-11 3:50am    
thanks,but these method only insert or replace Text.

Range(25,45) include Picture,Table,Format...
I want add all content of Range(25,45) just like Copy and Paste.

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