Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2007: Locate position on a page

Status
Not open for further replies.

BrianWen

Programmer
Jun 8, 2009
102
DK
Is there any way to get the position of the cursor or something on a given page in a Word Document. I have a userform, that based on checkboxes, insert fully texted chapters (heading 1 and some text afterwards). I want the script to read if there's more than perhaps 25% of the current page to go, if not, it should do a page break. This should result in a document, where a new chapter/section does start at the bottom of a page with only one line of text and then continues on the next page.

So, is there a property or something (on Selection class?) that tells me where on a page I currently am?

Thanks in advance!
 
the script then makes two paragraphs and inserts some text (Normal)."

Since you obviously are not using Styles properly - well at all it seems - then I will back out of this one.

Really, I am not trying to be overly critical, so please do not take it that way...but, this is NOT anywhere near the professional use of Word.

You could be avoiding most of the issues you have expressed if you were using Word professionally. A professional use of Word would never do anything like: "makes two paragraphs and inserts some text".

That is, if I understand correctly that those two paragraphs are being used to create space between the Heading 1 paragraph and the following text.

Professional use of Word would never use paragraphs to create that kind of spacing. The spacing would be built right into the Styles.

Gerry
 
First of all, I do know the possibilities of styles and therefore, do not use paragraphs for creating space. But I can see how you interpreted what I wrote as that, sorry about that.
Secondly, I am indeed fairly new to Word and discovering new features everyday, while working in this document. Your comments about professionalism are based on the wrong assumptions too. I never told you I was a Word professional. I meant the document is to be used in business, nothing more.

Anyway, I do understand your 'concerns', but trust me, it's not at all that bad...
Regarding the actual matter, I've created a fairly good solution based on all of you guys' inputs. So thanks you, all!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top