Document Range containing Entire Document

  • Thread starter Thread starter Wamiq Ansari
  • Start date Start date
W

Wamiq Ansari

Hi,

I need to create a range object that contains the entire document. This is
what I wrote in C#:
object start = 0; //start of document.

object end = docTemplate.Characters.Count; //end of document.

rngDoc1 = docTemplate.Range(ref start,ref end); //range object

Is this the correct way of doing it? Any help would be highly appreciated

Regards,

Wamiq Ansari

(e-mail address removed)
 
You can get an entire Word document as a Range object by using the
Content property of the Document class.
 
Back
Top