S
Silvester
I am automating PP2000 from an A2000 app using VBA.
Basically the data for the textbox on the slides will be taken from a query
based on database memo field data.
Before generating the slide I would like to give users the option of a
default color scheme of darkblue back with yellow text or to choose a PP
theme and go with those backgrounds and color scheme.
I've just put in a code excerpt of how I set the default slideshow
background - this is not the complete code - how would I give users the
option of choosing a PP theme and following the theme colours --- or going
with the default yellow on darkblue?
I need help with the coding please.
Thanks
___________________
Dim oPPT As PowerPoint.Application
Dim oPres As PowerPoint.Presentation
Set oPPT = New PowerPoint.Application
Set oPres = oPPT.Presentations.Add(True)
With oPres
For xloop = 1 To TotalSlides
.Slides.Add xloop, ppLayoutBlank
Select Case xloop
'---------------------------------------------
'SET THE BACKGROUND
'-------------------------------------------
Case xloop
With .Slides(xloop)
.FollowMasterBackground = msoFalse
.DisplayMasterShapes = msoTrue
With .Background
.Fill.Visible = msoTrue
.Fill.ForeColor.RGB = RGB(0, 51, 102)
.Fill.Transparency = 0#
.Fill.Solid
End With
End With
'--------------------------------------
' Add the TEXT BOX
'----------------------------------------
.Slides(xloop).Shapes.AddTextbox msoTextOrientationHorizontal, 10#, 10#,
700#, 36#
.Slides(xloop).Shapes.Range.TextFrame.WordWrap = msoTrue
.Slides(xloop).Shapes.Range.TextFrame.AutoSize = ppAutoSizeNone
.ExtraColors.Add RGB(Red:=255, Green:=255, Blue:=0)
With .Slides(xloop).Shapes(2).TextFrame.TextRange
.Characters Start:=1, Length:=0
.Text = strReplacedWords
With .Font
.Name = "Courier New"
.Size = 12
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoTrue
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
.Color.SchemeColor = ppBackground
End With
End With
Basically the data for the textbox on the slides will be taken from a query
based on database memo field data.
Before generating the slide I would like to give users the option of a
default color scheme of darkblue back with yellow text or to choose a PP
theme and go with those backgrounds and color scheme.
I've just put in a code excerpt of how I set the default slideshow
background - this is not the complete code - how would I give users the
option of choosing a PP theme and following the theme colours --- or going
with the default yellow on darkblue?
I need help with the coding please.
Thanks
___________________
Dim oPPT As PowerPoint.Application
Dim oPres As PowerPoint.Presentation
Set oPPT = New PowerPoint.Application
Set oPres = oPPT.Presentations.Add(True)
With oPres
For xloop = 1 To TotalSlides
.Slides.Add xloop, ppLayoutBlank
Select Case xloop
'---------------------------------------------
'SET THE BACKGROUND
'-------------------------------------------
Case xloop
With .Slides(xloop)
.FollowMasterBackground = msoFalse
.DisplayMasterShapes = msoTrue
With .Background
.Fill.Visible = msoTrue
.Fill.ForeColor.RGB = RGB(0, 51, 102)
.Fill.Transparency = 0#
.Fill.Solid
End With
End With
'--------------------------------------
' Add the TEXT BOX
'----------------------------------------
.Slides(xloop).Shapes.AddTextbox msoTextOrientationHorizontal, 10#, 10#,
700#, 36#
.Slides(xloop).Shapes.Range.TextFrame.WordWrap = msoTrue
.Slides(xloop).Shapes.Range.TextFrame.AutoSize = ppAutoSizeNone
.ExtraColors.Add RGB(Red:=255, Green:=255, Blue:=0)
With .Slides(xloop).Shapes(2).TextFrame.TextRange
.Characters Start:=1, Length:=0
.Text = strReplacedWords
With .Font
.Name = "Courier New"
.Size = 12
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoTrue
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
.Color.SchemeColor = ppBackground
End With
End With