none
How to get the Range of a specific section RRS feed

  • Question

  • Greetings,

    I'm looking for a way to get the exact range of a given word document section.

    Considering the following example:

    I have a document with these sections ... :

    1. Section 1
    2. Section 2
    3. Section 3

    ... and I want to get the Range of the entire Section 3.

    How can I do this with c# ?

    Thanks in advance.

    RomS
    Wednesday, July 25, 2012 3:54 PM

Answers

  • Word's Document object has a Content property. Content is an object of type Range, representing the entire document.

    Each range, including the one mascarading as 'Content', has a 'Sections' property.  'Sections' is a collection. You can access an individual Section by index.

    Each entry, i.e. each Section object, in turn has its own Range property, representing the area of the document you're interested in.

    Wednesday, July 25, 2012 8:39 PM

All replies

  • Word's Document object has a Content property. Content is an object of type Range, representing the entire document.

    Each range, including the one mascarading as 'Content', has a 'Sections' property.  'Sections' is a collection. You can access an individual Section by index.

    Each entry, i.e. each Section object, in turn has its own Range property, representing the area of the document you're interested in.

    Wednesday, July 25, 2012 8:39 PM
  • HI, There is an article talking about C# word skills. Please see.
    Thursday, July 26, 2012 1:37 AM
  • Hi,

    Thanks for your help !
    Monday, August 6, 2012 11:49 AM