expression.StartIsActive
expression Required. An expression that returns a Selection object.
Remarks
This property is equivalent to using the Flags property with the wdSelStartActive constant. However, using the Flags property requires binary operations, which are more complicated than using the StartIsActive property.
Example
This example extends the current selection through the next two words. To make sure that any currently selected text stays selected during the extension, the end of the selection is made active first. (For example, if the first three words of this paragraph were selected but the start of the selection were active, the MoveRight method call would simply deselect the first two words.)
With Selection
.StartIsActive = False
.MoveRight Unit:=wdWord, Count:=2, Extend:=wdExtend
End With
Here's the same example using the Flags property. This solution is problematic because you can only deactivate a Flags property setting by overwriting it with an unrelated value.
With Selection
If (.Flags And wdSelStartActive) = wdSelStartActive Then _
.Flags = wdSelReplace
.MoveRight Unit:=wdWord, Count:=2, Extend:=wdExtend
End With
Here's the same example using the MoveEnd method, which eliminates the need to check which end of the selection is active.
With Selection
.MoveEnd Unit:=wdWord, Count:=2
End With