Display Action Setting Window from VBA script

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using VBA, I open a presentation, go to a slide then highlight a shape.
Within VBA, I would like to be able to open/display the Action Settings
window associated with the highlighted shape. Then I would like to be able
to manually (from the keyboard) insert the information into the window, save
and close it.

Using the folowing code, I can enter info associated with the Action
Settings window, but I can not figure out how to get the window to display so
I can enter the information. Is there a way to display the Action Setting
Window within VBA code so that I can enter the info manually then when I
close it, let the VBA code continue?

Thanks.

ActiveWindow.Selection.SlideRange.Shapes("Rectangle 4").Select
With
ActiveWindow.Selection.ShapeRange.ActionSettings(ppMouseClick).Hyperlink
.Address = ""
.SubAddress = "-1,-1,LAST"
.ScreenTip = ""
.TextToDisplay = ""
 
This will launch the action setting dialog if applicable to the selected
shape, it will not halt the code execution though.:
' ======================================
Sub LaunchActionSettingDialog()
Dim oCmd As CommandBarButton
Set oCmd = CommandBars.FindControl(Id:=2892)
If Not oCmd Is Nothing Then
If oCmd.Enabled Then
oCmd.Execute
DoEvents
End If
End If
Set oCmd = Nothing
End Sub

' ======================================
Regards
Shyam Pillai

Animation Carbon - http://www.mvps.org/skp/ac/index.html
 
Back
Top