RobertoCSantosRJ
RobertoCSantosRJ

Reputation: 646

VBA for MS Word: is there a way to make a vertical selection programmatically?

Is there a possible way, in VBA for MS Word, to make a vertical selection? I mean: is it possible to simulate the behavior of the keys Shift+Alt+Selection (by mouse) in a MS Word VBA routine?

Upvotes: 5

Views: 300

Answers (1)

Ahmed AU
Ahmed AU

Reputation: 2777

I find this in2007 Word Developer Reference - Selection.ColumnSelectMode Property

With Selection
    .Collapse Direction:=wdCollapseStart
    .ColumnSelectMode = True
    .MoveRight Unit:=wdWord, Count:=10, Extend:=wdExtend
    .MoveDown Unit:=wdLine, Count:=20, Extend:=wdExtend
    .Copy
    .ColumnSelectMode = False
End With

Find it is working.

Upvotes: 1

Related Questions