Share via

select a paragraph vba

Anonymous
2011-08-22T14:22:20+00:00

I have not been able to find an answer to my question so I come to this forum. Using VBA code, how would I count the number of paragaraphs in a document and then select the third paragraph if it exists? Thank you for your help.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2011-08-22T15:46:25+00:00

Does this do what you want?

Sub Select3rdPara()

    If ActiveDocument.Paragraphs.Count >= 3 Then

        ActiveDocument.Paragraphs(3).Range.Select

    End If

End Sub

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful