Dim myvar As String
With Selection.Find
.Text = "YourWordHere"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWildcards = False
.Execute
End With
Selection.MoveRight Unit:=wdWord, Count:=1
myvar = Selection.Words(1).Text
--
Mark Tangard, Microsoft Word MVP
Please reply only to the newsgroup, not by private email.
Note well: MVPs do not work for Microsoft.
"Life is nothing if you're not obsessed." --John Waters
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.