Cursor Position



Is there nothing selected

If (Selection.Start = Selection.End) Then 
End If



Document, Start - Is the cursor at the start of the document



Document, End - Is the cursor at the end of the document

Is the cursor at the end of the document

If ((Selection.Type = wdSelectionIP) And (Selection.End = ActiveDocument.Content.End - 1)) Then 
End If

Does the current selection include the final paragraph mark.

If (Selection.Type = wdSelectionNormal) And (Selection.End = ActiveDocument.Content.End)) Then 
End If

Paragraph, Start - Is the cursor at the start of the paragraph

If (Selection.Start = Selection.Paragraphs(1).Range.Start) Then 
End If

For ranges substitute the range for the selection.



Paragraph, End - Is the cursor at the end of the paragraph

If (Selection.End = Selection.Paragraphs(1).Range.End - 1) Then 
End If




© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext