Finding parents dimensions

J

Jeremy

Hi all,

I have a paragraph or range that I need to know the dimensions of its
container. How can I do this? .. I know I can get "range.parent" ..but then
what? ..
Please, advice

Jeremy
 
K

Klaus Linke

Hi Jeremy,

Range.Parent doesn't give you the (immediate) container, it gives you the document.

The container would be the story range, and there's no direct method to get its height and width.

Text boxes would probably be the simplest case.
For the main document story, you could calculate the height and width from the (document's/section's) page size and margins.
For the headers and footers, it would work similar.

For footnotes, the width would be equal to the width of the text area, but the height will only be calculated on the fly (as needed).
And for comments, it would depend on how you display them (comment area below the text or comment balloons).

Regards,
Klaus
 

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