Microsoft KB Archive/212583

= WD2000: wdParagraph with ColumnSelectMode Does Not Select Text Column =

Article ID: 212583

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q212583





SYMPTOMS
In a Visual Basic for Applications macro, you cannot use the wdParagraph constant in conjunction with the ColumnSelectMode property to select a vertical column of text.



WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. To work around this problem, use the wdLine constant instead of the wdParagraph constant, as in the following example:

Sub SelectVerticalColumn

With Selection .Collapse .ColumnSelectMode = True ' Count specifies the number of characters to the right ' to select. In this case the number is 3. .MoveRight Unit:=wdCharacter, Count:=3, Extend:=wdExtend ' Count specifies the number of Lines down ' to select. In this case the number is 2. .MoveDown Unit:=wdLine, Count:=2 End With

End Sub



MORE INFORMATION
For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base:

212536 OFF2000: How to Run Sample Code from Knowledge Base Articles

