Document Range containing Entire Document

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)
 
S

Stefan Blom

You can get an entire Word document as a Range object by using the
Content property of the Document class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top