JustMe
JustMe

Reputation: 6095

How to Extend Selection to whole paragraph via VBA

I am using this code to extend selection to whole line on word document, Now I want to extend selection to whole paragraph

Selection.Expand wdLine

Upvotes: 2

Views: 6254

Answers (2)

user6432984
user6432984

Reputation:

If you know one of the enumerated values then you can use the Object Explorer to find the name of the Enumeration. By referencing the Enumeration you'll be able to use Intellisense to determine all the valid values.

enter image description here

Upvotes: 1

Prebsus
Prebsus

Reputation: 695

Try using a different WdUnit like wdParagraph:

Selection.Expand wdParagraph

See this link for an overview of the different WdUnits: https://msdn.microsoft.com/en-us/library/office/ff838950.aspx

Upvotes: 5

Related Questions