compare selected text

S

snafu

I'm using MS word to modify code for another program, and it's all
rather repetitive. I've managed to script most of the modifications,
however there is still a significant amount of work for users to do.
They still have to select the correct toolbar button based on
information contained in the code profile.

Is there some way to have VB examine text selected either through use
of a find function or extend method?

an example of the code being examined is:
FLTPLN2 154500 SKK1013 * 5133 I B190/*/G . CYXE 1600 250 CYWG

right now I'm using a InputBox where I'll enter infomation based on the
line above. For example the number 250 represents one variable, and
depending on the variable different TypeText is executed. I'd like to
get VB to examine that number, which is always a certain number of
units (13 I think) to the right of the begining of the line.

Thanks
 
S

snafu

No sooner had I posted than I came across what I think will work:

Dim altitude
If selection.Type = wdSelectionNormal Then altitude = selection.Text

any other suggestions are appreciated
 

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