I would like to adapt this code so that the user is prompted by an input box to enter text which is then searched for. At the moment, it says "Las Vegas" and I am editing the code manually every time I want to change it and search for a different item. I'd like to be able to enter any text in a box when using Word. Ideally, I would have a keyboard shortcut to open the input box, enter text, press return and the macro would produce its result. Grateful for any help, please. Thanks.
Code:
Sub CreateSummary()
'
' CreateSummary Macro
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Las Vegas"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Do While Selection.Find.Execute
Selection.StartOf Unit:=wdParagraph
Selection.MoveEnd Unit:=wdParagraph
sBigString = sBigString + Selection.Text
Selection.MoveStart Unit:=wdParagraph
Loop
Documents.Add DocumentType:=wdNewBlankDocument
Selection.InsertAfter (sBigString)
End Sub