Not sure if this is the correct forum. Writting a ribbonbar addin in
vb2008 to change the background of an indivdual slide. This program
does it for all slides How come?
On Error GoTo NoBackgroundFou nd
Dim ActWinSlideRang e As
Microsoft.Offic e.Interop.Power Point.SlideRang e
Dim ActWinSlidePres entation As
Microsoft.Offic e.Interop.Power Point.Presentat ion
ActWinSlideRang e =
PowerPointAddIn 1.Globals.Ribbo n2008.Applicati on.ActiveWindow .Presentation.S lides.Range()
ActWinSlidePres entation =
PowerPointAddIn 1.Globals.Ribbo n2008.Applicati on.ActiveWindow .Presentation
With ActWinSlideRang e
.FollowMasterBa ckground =
Microsoft.Offic e.Core.MsoTriSt ate.msoFalse
.DisplayMasterS hapes =
Microsoft.Offic e.Core.MsoTriSt ate.msoTrue
With .Background
.Fill.Visible =
Microsoft.Offic e.Core.MsoTriSt ate.msoTrue
.Fill.ForeColor .RGB = RGB(255, 255, 255)
.Fill.BackColor .SchemeColor =
PowerPoint.PpCo lorSchemeIndex. ppShadow
.Fill.Transpare ncy = 0.0#
If InStr(ActWinSli dePresentation. Name, ".pptm") 0
Then
.Fill.UserPictu re("C:\My
Documents\Power point\Backgroun d\" &
Replace(ActWinS lidePresentatio n.Name, ".pptm", "") & "\Ultra
Background Slide.jpg")
Else
.Fill.UserPictu re("C:\My
Documents\Power point\Backgroun d\" &
Replace(ActWinS lidePresentatio n.Name, ".ppt", "") & "\Ultra Background
Slide.jpg")
End If
End With
End With
Exit Sub
NoBackgroundFou nd:
MsgBox("No Background Found")
End Sub
vb2008 to change the background of an indivdual slide. This program
does it for all slides How come?
On Error GoTo NoBackgroundFou nd
Dim ActWinSlideRang e As
Microsoft.Offic e.Interop.Power Point.SlideRang e
Dim ActWinSlidePres entation As
Microsoft.Offic e.Interop.Power Point.Presentat ion
ActWinSlideRang e =
PowerPointAddIn 1.Globals.Ribbo n2008.Applicati on.ActiveWindow .Presentation.S lides.Range()
ActWinSlidePres entation =
PowerPointAddIn 1.Globals.Ribbo n2008.Applicati on.ActiveWindow .Presentation
With ActWinSlideRang e
.FollowMasterBa ckground =
Microsoft.Offic e.Core.MsoTriSt ate.msoFalse
.DisplayMasterS hapes =
Microsoft.Offic e.Core.MsoTriSt ate.msoTrue
With .Background
.Fill.Visible =
Microsoft.Offic e.Core.MsoTriSt ate.msoTrue
.Fill.ForeColor .RGB = RGB(255, 255, 255)
.Fill.BackColor .SchemeColor =
PowerPoint.PpCo lorSchemeIndex. ppShadow
.Fill.Transpare ncy = 0.0#
If InStr(ActWinSli dePresentation. Name, ".pptm") 0
Then
.Fill.UserPictu re("C:\My
Documents\Power point\Backgroun d\" &
Replace(ActWinS lidePresentatio n.Name, ".pptm", "") & "\Ultra
Background Slide.jpg")
Else
.Fill.UserPictu re("C:\My
Documents\Power point\Backgroun d\" &
Replace(ActWinS lidePresentatio n.Name, ".ppt", "") & "\Ultra Background
Slide.jpg")
End If
End With
End With
Exit Sub
NoBackgroundFou nd:
MsgBox("No Background Found")
End Sub