I
IdaK
Through VBA I've created a slide to print the results of a test. The
background on the rest of the slide is fairly colorful and when I create the
new slide it automatically uses this same background. I would like to change
it to a simple solid white or light colored background. I've tried several
attempts but with no avail. I have the same problem with not being able to
change out the background on the automatic Title box and Text box that are a
part of the layout. I can change everything about the text inside the boxes
but can't recolor the slide or the text boxes. Any ideas?
Here is the code I've tried so far.
Sub PrintablePage()
Dim printableSlide As Slide
Dim homeButton As Shape
Dim printButton As Shape
Dim needtopay As String
Set printableSlide =
ActivePresentation.Slides.Add(Index:=printableSlideNum, _
Layout:=ppLayoutText)
' change background color
With printableSlide
.Design.SlideMaster.Background.Fill.ForeColor.RGB = vbWhite
.Design.SlideMaster.Background.Fill.BackColor.RGB = vbWhite
.Master.Background.Fill.ForeColor.RGB = vbWhite
.Master.Background.Fill.BackColor.RGB = vbWhite
.Background.Fill.BackColor.RGB = vbWhite
.Background.Fill.ForeColor.RGB = vbWhite
End With
printableSlide.Shapes(1).TextFrame.TextRange.Text = _
"Results for " & strFirst & " " & strLast
With printableSlide.Shapes(1)
.Fill.ForeColor.RGB = vbWhite
.Fill.BackColor.RGB = vbWhite
.Line.BackColor.RGB = vbYellow
.Line.ForeColor.RGB = vbGreen
.TextFrame.TextRange.Font.Color.RGB = vbBlack
.TextFrame.TextRange.Font.Italic = False
.TextFrame.TextRange.Font.Size = 16
End With
background on the rest of the slide is fairly colorful and when I create the
new slide it automatically uses this same background. I would like to change
it to a simple solid white or light colored background. I've tried several
attempts but with no avail. I have the same problem with not being able to
change out the background on the automatic Title box and Text box that are a
part of the layout. I can change everything about the text inside the boxes
but can't recolor the slide or the text boxes. Any ideas?
Here is the code I've tried so far.
Sub PrintablePage()
Dim printableSlide As Slide
Dim homeButton As Shape
Dim printButton As Shape
Dim needtopay As String
Set printableSlide =
ActivePresentation.Slides.Add(Index:=printableSlideNum, _
Layout:=ppLayoutText)
' change background color
With printableSlide
.Design.SlideMaster.Background.Fill.ForeColor.RGB = vbWhite
.Design.SlideMaster.Background.Fill.BackColor.RGB = vbWhite
.Master.Background.Fill.ForeColor.RGB = vbWhite
.Master.Background.Fill.BackColor.RGB = vbWhite
.Background.Fill.BackColor.RGB = vbWhite
.Background.Fill.ForeColor.RGB = vbWhite
End With
printableSlide.Shapes(1).TextFrame.TextRange.Text = _
"Results for " & strFirst & " " & strLast
With printableSlide.Shapes(1)
.Fill.ForeColor.RGB = vbWhite
.Fill.BackColor.RGB = vbWhite
.Line.BackColor.RGB = vbYellow
.Line.ForeColor.RGB = vbGreen
.TextFrame.TextRange.Font.Color.RGB = vbBlack
.TextFrame.TextRange.Font.Italic = False
.TextFrame.TextRange.Font.Size = 16
End With