Word.Page and range.

N

nitm

hi,

i have a page object (which i got from the Word.Pages collection).
i want to know some properties of this page, like the page number and more
importantly i want to get the range of the page.
i need to get the xml (openXML) of the page.
so, i'm looking for something like:
Range pageRange = page.getRange();
XmlDocument doc = new XmlDocumet();
doc.LoadXml(pageRange.WordOpenXML);
........

is this possible somehow?
thanks, nitzan
 
O

omar.alobidat

hi,

i have a page object (which i got from the Word.Pages collection).
i want to know some properties of this page, like the page number and more
importantly i want to get the range of the page.
i need to get the xml (openXML) of the page.
so, i'm looking for something like:
Range pageRange = page.getRange();
XmlDocument doc = new XmlDocumet();
doc.LoadXml(pageRange.WordOpenXML);
.......

is this possible somehow?
thanks, nitzan

Try using by following approach:
// C#

foreach (MSword.Page page in
Word.ActiveDocument.ActiveWindow.Panes[1].Pages)
{
foreach (MSword.Rectangle rect in page.Rectangles)
{
// each page has several rectangles and each of them has its
range
......
......
}
}

Cheers.
 

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