Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Pennsylvania, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Determine row number of insertion point in VB macr (Word XP)

    I'd appreciate some help with a macro to locate empty pages (those containing only an empty paragraph and/or a page break) in Word output generated by AuthorIT. Various logical schemes require me to know the line number of the insertion point as I spin through the document. I can determine the first character of a selection (wdFirstCharacterLineNumber) but I cannot find a way to select one "line" at a time or to set a range equal to a single line. This is probably available information, since Word displays both the current column and the line number at the bottom of the screen...but I can't find them in VB. It would help if someone can point me to the appropriate property for the line number. Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Determine row number of insertion point in VB macr (Word XP)

    You can use

    Selection.Information(wdFirstCharacterLineNumber)

    to determine the line number of the insertion point.

  3. #3
    Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Pennsylvania, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determine row number of insertion point in VB

    Right....I mentioned that in my original post. But do you know of a way to grab the line number that Word echoes at the bottom of the page when you're working in Print Layout view? (I'm referring to the "Ln xx Col yy" displayed at the bottom of the screen.) Or do these refer _only_ to the onscreen display without direct correlation to the print layout?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Determine row number of insertion point in VB

    Sorry, don't understand.

  5. #5
    Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Pennsylvania, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determine row number of insertion point in VB

    That's because I'm a fool. I was geting confused between the Information arguments for row number and line number. I've got it now. Thank you for your trouble.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •