Grabbing specific text using vba

Z

zorzos

How can i retrieve a specific text from an opened word document
starting from a specific position and moving to the right until a
specific character is found,using vba?


Pls, its urgent!!!!!!!
 
H

Helmut Weber

Hi,
e.g.
Dim r As Range
Set r = Selection.Range
r.Start = 12 ' character 12 in doc
r.MoveEndUntil "!" ' next exclamation-mark
MsgBox r.Text
 

Ask a Question

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.

Ask a Question

Top