C
Chris
To Whom It Concerns:
I am trying to get the text area of a regular slide (Shape 2) to change font
sizes from 32 to 24. I have included the code below. I am able to do it in
one presentation but not in this one. Any advice from anyone would be
greatly appreciated.
Chris
-----Code to create additional slide & add text and buttons-----
Sub PrintablePage()
Dim printableSlide As Slide
Dim homeButton As Shape
Dim printButton As Shape
Dim endButton As Shape
Set printableSlide = ActivePresentation.Slides.Add(Index:=81, _
Layout:=ppLayoutText)
printableSlide.FollowMasterBackground = msoFalse
printableSlide.Shapes(1).TextFrame.TextRange.Text = "Results for " &
username
PowerPoint.ActivePresentation.Slides(81).Shapes(2).TextFrame.TextRange.Font.Size = 24 'This is the latest attempt
'printableSlide.Shapes(2).TextFrame.TextRange.Font.Size = 24' This line
works in other presentations but is Remarked while I work on finding the
solution
printableSlide.Shapes(2).TextFrame.AutoSize = ppAutoSizeNone
printableSlide.Shapes(2).TextFrame.TextRange.ParagraphFormat.Bullet.Type
= ppBulletNone
printableSlide.Shapes(2).TextFrame.TextRange.Text = _
"You correctly answered " & QCorrect & " out of " & _
intAnswerCnt & "." & Chr$(13) & _
"Your Percentage is " & Format(QCorrect / intAnswerCnt, "00.00%") &
Chr$(13) & _
"It took you " & Format((EndTime - BeginTime) / 60, "00.00") & "
minutes to complete this training." & _
Chr$(13) & "Your Average Time Per Slide was " & Format(AvgSlideTime,
"00.00") & " seconds." & _
Chr$(13) & "Press the Print Results button to print the certificate."
Set homeButton = ActivePresentation.Slides(81).Shapes.AddShape _
(msoShapeActionButtonCustom, 50, 400, 250, 50)
homeButton.TextFrame.TextRange.Text = "Start Again"
homeButton.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
homeButton.TextFrame.TextRange.Font.Size = 25
homeButton.AutoShapeType = msoShapeLeftArrow
homeButton.Fill.PresetTextured msoTextureBlueTissuePaper
homeButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
homeButton.ActionSettings(ppMouseClick).Run = "StartAgain"
Set printButton = ActivePresentation.Slides(81).Shapes.AddShape _
(msoShapeActionButtonCustom, 320, 400, 250, 50)
printButton.TextFrame.TextRange.Text = "Print Results"
printButton.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
printButton.TextFrame.TextRange.Font.Size = 25
printButton.AutoShapeType = msoShapeRightArrow
printButton.Fill.PresetTextured msoTextureBlueTissuePaper
printButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
printButton.ActionSettings(ppMouseClick).Run = "PrintResults"
Set endButton = ActivePresentation.Slides(81).Shapes.AddShape _
(msoShapeActionButtonCustom, 160, 460, 300, 50)
endButton.TextFrame.TextRange.Text = "End Presentation"
endButton.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
endButton.TextFrame.TextRange.Font.Size = 25
endButton.AutoShapeType = msoShapeFlowchartTerminator
endButton.Fill.PresetTextured msoTextureBlueTissuePaper
endButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
endButton.ActionSettings(ppMouseClick).Run = "EndNow"
ActivePresentation.SlideShowWindow.View.Next
ActivePresentation.Saved = True
End Sub
I am trying to get the text area of a regular slide (Shape 2) to change font
sizes from 32 to 24. I have included the code below. I am able to do it in
one presentation but not in this one. Any advice from anyone would be
greatly appreciated.
Chris
-----Code to create additional slide & add text and buttons-----
Sub PrintablePage()
Dim printableSlide As Slide
Dim homeButton As Shape
Dim printButton As Shape
Dim endButton As Shape
Set printableSlide = ActivePresentation.Slides.Add(Index:=81, _
Layout:=ppLayoutText)
printableSlide.FollowMasterBackground = msoFalse
printableSlide.Shapes(1).TextFrame.TextRange.Text = "Results for " &
username
PowerPoint.ActivePresentation.Slides(81).Shapes(2).TextFrame.TextRange.Font.Size = 24 'This is the latest attempt
'printableSlide.Shapes(2).TextFrame.TextRange.Font.Size = 24' This line
works in other presentations but is Remarked while I work on finding the
solution
printableSlide.Shapes(2).TextFrame.AutoSize = ppAutoSizeNone
printableSlide.Shapes(2).TextFrame.TextRange.ParagraphFormat.Bullet.Type
= ppBulletNone
printableSlide.Shapes(2).TextFrame.TextRange.Text = _
"You correctly answered " & QCorrect & " out of " & _
intAnswerCnt & "." & Chr$(13) & _
"Your Percentage is " & Format(QCorrect / intAnswerCnt, "00.00%") &
Chr$(13) & _
"It took you " & Format((EndTime - BeginTime) / 60, "00.00") & "
minutes to complete this training." & _
Chr$(13) & "Your Average Time Per Slide was " & Format(AvgSlideTime,
"00.00") & " seconds." & _
Chr$(13) & "Press the Print Results button to print the certificate."
Set homeButton = ActivePresentation.Slides(81).Shapes.AddShape _
(msoShapeActionButtonCustom, 50, 400, 250, 50)
homeButton.TextFrame.TextRange.Text = "Start Again"
homeButton.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
homeButton.TextFrame.TextRange.Font.Size = 25
homeButton.AutoShapeType = msoShapeLeftArrow
homeButton.Fill.PresetTextured msoTextureBlueTissuePaper
homeButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
homeButton.ActionSettings(ppMouseClick).Run = "StartAgain"
Set printButton = ActivePresentation.Slides(81).Shapes.AddShape _
(msoShapeActionButtonCustom, 320, 400, 250, 50)
printButton.TextFrame.TextRange.Text = "Print Results"
printButton.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
printButton.TextFrame.TextRange.Font.Size = 25
printButton.AutoShapeType = msoShapeRightArrow
printButton.Fill.PresetTextured msoTextureBlueTissuePaper
printButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
printButton.ActionSettings(ppMouseClick).Run = "PrintResults"
Set endButton = ActivePresentation.Slides(81).Shapes.AddShape _
(msoShapeActionButtonCustom, 160, 460, 300, 50)
endButton.TextFrame.TextRange.Text = "End Presentation"
endButton.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
endButton.TextFrame.TextRange.Font.Size = 25
endButton.AutoShapeType = msoShapeFlowchartTerminator
endButton.Fill.PresetTextured msoTextureBlueTissuePaper
endButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
endButton.ActionSettings(ppMouseClick).Run = "EndNow"
ActivePresentation.SlideShowWindow.View.Next
ActivePresentation.Saved = True
End Sub