Click here to Skip to main content
15,887,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends I don't know how to merge more than two range values in single word range in c#.net any one have better answer.

I have ranges are

CSS
Word.Range r1 = null;
          Word.Range r2 = null;
          Word.Range r3 = null;
          Word.Range r4 = null;
          Word.Range r5 = null;


after ranges all get the value

how to merge the above 5 ranges

CSS
Word.Range temp=r1 +r5 + r2 + r3 + r5 + r3;


how to store range values in this order in range temp
Posted

1 solution

I'd suggest to read this: How to: Programmatically Define and Select Ranges in Documents[^]

As far as i see, you're trying to "merge" (whatever it means) ranges that are null!

C#
Word.Range temp=r1(null) +r5(null) + r2(null) + r3(null) + r5(null) + r3(null);
 
Share this answer
 

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