Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Determining if you are in an end of row marker (Word 2003)

    In a macro I have designed I move down one paragraph in a table. In some cases, this results in the cursor ending up to the right of the last column in the end of row marker.

    Is there a way in VBA to determine if you are in an end of row marker, so I can take appropriate action?

    Thanks!!
    Troy

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Determining if you are in an end of row marker (Word 2003)

    Edited by StuartR to replace a complicated method with a much simpler one

    I think that the simplest way is to check if
    <code>Selection.Information(wdAtEndOfRowMarker)</code> is True

    StuartR

  3. #3
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determining if you are in an end of row marker (Word 2003)

    Works great!! The help actually mentions a couple of things. The syntax was actually different from the example.

    IsEndOfRowMark Property
    See AlsoApplies ToExampleSpecificsTrue if the specified selection or range is collapsed and is located at the end-of-row mark in a table. Read-only Boolean.

    Note This property is the equivalent of the following expression:

    <pre>Selection.Information(wdAtEndOfRowMarker)</pre>



    Example
    This example collapses the selection and selects the current row if the insertion point is at the end of the row (just before the end-of-row mark).

    <pre>Selection.Collapse Direction:=wdCollapseEnd
    If Selection.IsEndOfRowMark = True Then
    Selection.Rows(1).Select
    End If</pre>




    Either one of them works. I searched several ways in the help, but never found this topic.

    Thanks for the help!!
    Troy

Posting Permissions

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