|
-
Aug 26th, 2003, 10:51 PM
#1
PowerPoint - Selected Action Item
If I have 'Action Settings' assigned to 3 words in a Power Point Slide,
how can I return the 'selected' (mouse down) word, that is an Action item, within that slide.
ie If the one of the Action items is the word "visual", and I select it with the mouse (it envokes the Action - a Macro), that I can pass the word "visual" to the Macro (Module Sub).
I have tried many methods. It appears 'Hyperlinks' have thier oun collection, but not 'Action Settings'.
Cheers,
Bruce.
Last edited by Bruce Fox; Aug 27th, 2003 at 04:05 PM.
-
Aug 27th, 2003, 11:43 PM
#2
-
Aug 30th, 2003, 02:16 AM
#3
Ideas
-
Aug 31st, 2003, 01:20 PM
#4
Addicted Member
you could place the hyperlink in a textbox
and you the text box events
Just an idea
-
Aug 31st, 2003, 04:49 PM
#5
Thanks for the reply adocwra,
Unfortunatly that isn't an option as there are too many slides, and I want to apply this proccess to other peoples .ppts.
I have played around with a few API's to return the text under the mouse,
but it seem to have to be 'selected' text.
In short, I need some way of returning the 'word' (thats been setup as an Action Item) to be returned.
PPT must know what Action Item (word) that was selected, as it can run the Macro or whatever Action has been set - I need to tap into that.
Maybe subclassing, but I think that would be too hazardous as these
PPTs will be given over a LAN.
Bruce.
-
Aug 31st, 2003, 07:04 PM
#6
Addicted Member
i know this code shows all actions as link in a presentation maybe you could play around with this
Code:
Dim a As Slide
Set a = ActivePresentation.Slides(1)
For i = 1 To a.Hyperlinks.Count - 1
Debug.Print a.Hyperlinks(i).TextToDisplay
Next
-
Aug 31st, 2003, 07:06 PM
#7
Addicted Member
i know this code shows all actions as link in a presentation maybe you could play around with this
Code:
Dim a As Slide
Set a = ActivePresentation.Slides(1)
For i = 1 To a.Hyperlinks.Count - 1
Debug.Print a.Hyperlinks(i).TextToDisplay
Next
and in the object browser you can get all the classes and properties
-
Aug 31st, 2003, 08:22 PM
#8
Addicted Member
i assigned macro1 to the action to run on mouse click
macro1 has
Code:
a = ActiveWindow.Selection.TextRange
Debug.Print a
'and i think this is what you need
'then i recorded the assigning of the acrion and it gave me this
With ActiveWindow.Selection.ShapeRange.ActionSettings(ppMouseOver)
.Run = "Macro1"
.Action = ppActionRunMacro
.SoundEffect.Type = ppSoundNone
.AnimateAction = msoFalse
End With
i know this is bad programming but i dont know powerpoint as well as i do everythinng else
-
Aug 31st, 2003, 10:49 PM
#9
Thanks again, I had unsuccessfully tried similar approaches 
But, I'm still trying.....
Cheers,
Bruce.
-
Sep 1st, 2003, 11:09 AM
#10
Addicted Member
sub mac
a = ActiveWindow.Selection.TextRange
Debug.Print a
'and i think this is what you need
if a="visual" then dosomethingelse
end sub
would work I think
the example of
With ActiveWindow.Selection.ShapeRange.ActionSettings(ppMouseOver)
.Run = "Macro1"
.Action = ppActionRunMacro
.SoundEffect.Type = ppSoundNone
.AnimateAction = msoFalse
End With
was to show how to programatically assign the macro to the action
-
Sep 1st, 2003, 06:01 PM
#11
Originally posted by adocwra
was to show how to programatically assign the macro to the action
Yep, I was aware of that 
Unfortunatly, I think .TextRange returns ALL the text (in the shape), not just the Action Item.
It kinda sucks, I didn't think it would be this hard PPT must know what item was selected so it can take action.
Hmmmm.
Bruce.
-
Sep 1st, 2003, 08:01 PM
#12
Bugger!
I have just been messing with the PPT MS Design Environment, that displays the Script behid the presentation.
Each Action has a unique call to the Macro. In short, I don't think I can do what I wanted... - well see
-
Sep 1st, 2003, 08:32 PM
#13
Addicted Member
I guess I am fasinated with this
you could make a macro for each action
-
Sep 2nd, 2003, 11:00 AM
#14
Fanatic Member
I take it you can't assign different actions
thus:
Word1 >> MyFunc(Foo)
Word2 >> MyFunc(Bar)
-
Sep 2nd, 2003, 05:08 PM
#15
adocwra & Matt,
Your right, I could make a Macro for each word.... but that wouldn't work for my situation. 
Scenario
What I'm attempting to do is to have a global Glossary of Terms (GoT), that exist for use by many Instructors. So, during a PPT pressentation,
a instructor could click (on a pre determind word) and they would be pressented
with a MsgBox containing the 'words' definition.
The reaon for this approach, is that I can get each instructor (10+) to simply set 'thier' word to an Action Setting, for the GoT Macro, and vola! Each ingividual needs no programming skills to do this. I will code up the Maco (Module) and apply it thru our 'Template' (of course I will add the 'word' definitions as required).
Plan
I have the GoT (list) saved as an .ini file, and I'm using the Ini API to return the relavent definition.
Problem
To make this work, I need to be able to pass the selected (Action Set) 'word' to the API to return the appropriate definition.
(I don't want to use the 'Screen Tip' as an alternate )
Hope that makes sense.
Thanks again for your input 
Bruce.
Last edited by Bruce Fox; Sep 2nd, 2003 at 05:12 PM.
-
Sep 3rd, 2003, 04:45 PM
#16
-
Sep 3rd, 2003, 04:50 PM
#17
Addicted Member
sounds like assigning a macro to each link would be nearly impossible
good luck fiding the solution I'm out of ideas but will keep thinking about it
-
Sep 3rd, 2003, 05:31 PM
#18
Cheers - Watch this space.....
Bruce.
-
Sep 3rd, 2003, 06:56 PM
#19
Addicted Member
cant wait to see you figure it out
you can figure out what rectangle you are in but because you cant select an action you never have selected text
Bummer
Anna
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|