Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text selection macro

Status
Not open for further replies.

charliew001

Technical User
Jun 4, 2012
8
US
Hi,

First time poster and have very limited programming knowledge. I need help with the below macro to modify it to begin the range with a start word "a." ; I have a lot of multiple choice test questions I need to put into an excel chart and I want to make the formatting easier. Basically, I want the macro to be able to select all text that begins with "a." and ends the selection at the end of the paragraph of which "a." started.

Below macro I was trying to modify.

Sub SelectRange()
Dim rngParagraphs As Range
Set rngParagraphs = ActiveDocument.Range( _
Start:=ActiveDocument.Paragraphs(1).Range.Start, _
End:=ActiveDocument.Paragraphs(4).Range.End)
rngParagraphs.Select
End Sub

Thank You all in advance
 


See my post in your forum68 thread.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top