> My users want to be able to point anywhere in a continguous string of text in
> a textbox, and then do something with that particluar string. They
> specifically don't want to have to select the text - they just want to point
> and shoot.
If they've clicked in the text, you should be able to return the text from the
shape (but until PPT 2210 with its IntelliReadMyMind technology comes out, it
won't be able to guess which text they'd have selected had they wanted to <g>)
> Is that at all possible with VBA? I can get the pixel location of the mouse
> pointer, but after that I don't know what to do to convert that to the string
> of text there.
>
> Is this at all doable? Or do I just tell them, "Sorry - can't be done?"
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Dave Jenkins - 20 Apr 2008 15:33 GMT
Hi Steve:
No mindreading involved. The application is this: if, in the editor, they
see a URL on a slide, they want to click anyplace in it (instead of selecting
it) and browse to that site with the user's default browser. I've got all
that working ok, but the way I've got it written now requires them to select
the URL in question. I don't see that that's such an onerous requirement
myself, but I thought I'd investigate trying to do what they want, and ended
up getting stumped.

Signature
Dave Jenkins
K5KX
> > My users want to be able to point anywhere in a continguous string of text in
> > a textbox, and then do something with that particluar string. They
[quoted text clipped - 16 lines]
> PPTools: www.pptools.com
> ================================================
Steve Rindsberg - 21 Apr 2008 05:09 GMT
> Hi Steve:
>
[quoted text clipped - 5 lines]
> myself, but I thought I'd investigate trying to do what they want, and ended
> up getting stumped.
I suspect the best you can do is get the text they've clicked in
ActiveWindow.Selection.TextRange.Parent.Parent.TextFrame.TextRange.Text
then search it for something that looks like a URL; let them choose which URL
if there are multiples.
Or tell them to rightclick it and choose Open Hyperlink and get a life? ;-)
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Dave Jenkins - 21 Apr 2008 14:21 GMT
No can do on the right-click op -- because of our production requirements, we
remove the hyperlink formatting from URLs and they show as a "normal" string
of text.
However, your VBA snippet holds some possibilities, which I will now go off
and investigate - thanks! (And of course, I feel compleed to add that having
a regular expression search available to me will make the search for a URL in
the text returned from your VBA code a snap!)

Signature
Dave Jenkins
K5KX
> > Hi Steve:
> >
[quoted text clipped - 20 lines]
> PPTools: www.pptools.com
> ================================================
Steve Rindsberg - 21 Apr 2008 22:35 GMT
> No can do on the right-click op -- because of our production requirements, we
> remove the hyperlink formatting from URLs and they show as a "normal" string
[quoted text clipped - 4 lines]
> a regular expression search available to me will make the search for a URL in
> the text returned from your VBA code a snap!)
<g> Somehow I *knew* you were gonna gloat about that.
Rightfully. You've earned it.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================