G
Geoff Cox
Hello,
I have code below which works fine and adds a next/forward action
button to each slide except the last one.
But!
If I add a text box (for user entry of text) using the Control Toolbox
(on the tool bar) and insert a textbox, making EnterKeyBehaviour true,
the code will no longer add the action buttons!
Why is this?
Cheers
Geoff
Dim oPresentation As Presentation
Set oPresentation = Presentations.Open(strMyFile)
Dim SldNum As Integer
Dim oSh As Shape
Dim Sld As Slide
For SldNum = 1 To .Slides.Count - 1
Set oSh = oPresentation.Slides(SldNum).Shapes.AddShape
_(msoShapeActionButtonForwardorNext, 586.75, 496.75, 96.38, 28.38)
With oSh.ActionSettings(ppMouseClick)
..Action = ppActionNextSlide
With oSh.TextFrame.TextRange
.Text = "next"
With .Font
.Name = "Arial"
.Size = 18
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoFalse
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
.Color.SchemeColor = ppForeground
End With
End With
End With
Next
I have code below which works fine and adds a next/forward action
button to each slide except the last one.
But!
If I add a text box (for user entry of text) using the Control Toolbox
(on the tool bar) and insert a textbox, making EnterKeyBehaviour true,
the code will no longer add the action buttons!
Why is this?
Cheers
Geoff
Dim oPresentation As Presentation
Set oPresentation = Presentations.Open(strMyFile)
Dim SldNum As Integer
Dim oSh As Shape
Dim Sld As Slide
For SldNum = 1 To .Slides.Count - 1
Set oSh = oPresentation.Slides(SldNum).Shapes.AddShape
_(msoShapeActionButtonForwardorNext, 586.75, 496.75, 96.38, 28.38)
With oSh.ActionSettings(ppMouseClick)
..Action = ppActionNextSlide
With oSh.TextFrame.TextRange
.Text = "next"
With .Font
.Name = "Arial"
.Size = 18
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoFalse
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
.Color.SchemeColor = ppForeground
End With
End With
End With
Next