K
KennyA
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 NOT the SELECTED SLIDES
How come?
On Error GoTo NoBackgroundFound
Dim ActWinSlideRange As
Microsoft.Office.Interop.PowerPoint.SlideRange
Dim ActWinSlidePresentation As
Microsoft.Office.Interop.PowerPoint.Presentation
ActWinSlideRange
PowerPointAddIn1.Globals.Ribbon2008.Application.ActiveWindow.Presentation.Slides.Range()
ActWinSlidePresentation =
PowerPointAddIn1.Globals.Ribbon2008.Application.ActiveWindow.Presentation
With ActWinSlideRange
.FollowMasterBackground =
Microsoft.Office.Core.MsoTriState.msoFalse
.DisplayMasterShapes =
Microsoft.Office.Core.MsoTriState.msoTrue
With .Background
.Fill.Visible =
Microsoft.Office.Core.MsoTriState.msoTrue
.Fill.ForeColor.RGB = RGB(255, 255, 255)
.Fill.BackColor.SchemeColor =
PowerPoint.PpColorSchemeIndex.ppShadow
.Fill.Transparency = 0.0#
If InStr(ActWinSlidePresentation.Name, ".pptm") > 0
Then
.Fill.UserPicture("C:\My
Documents\Powerpoint\Background\" &
Replace(ActWinSlidePresentation.Name, ".pptm", "") & "\Ultra
Background Slide.jpg")
Else
.Fill.UserPicture("C:\My
Documents\Powerpoint\Background\" &
Replace(ActWinSlidePresentation.Name, ".ppt", "") & "\Ultra Background
Slide.jpg")
End If
End With
End With
Exit Sub
NoBackgroundFound:
MsgBox("No Background Found")
End Sub
vb2008 to change the background of an indivdual slide. This program
does it for all slides NOT the SELECTED SLIDES
How come?
On Error GoTo NoBackgroundFound
Dim ActWinSlideRange As
Microsoft.Office.Interop.PowerPoint.SlideRange
Dim ActWinSlidePresentation As
Microsoft.Office.Interop.PowerPoint.Presentation
ActWinSlideRange
PowerPointAddIn1.Globals.Ribbon2008.Application.ActiveWindow.Presentation.Slides.Range()
ActWinSlidePresentation =
PowerPointAddIn1.Globals.Ribbon2008.Application.ActiveWindow.Presentation
With ActWinSlideRange
.FollowMasterBackground =
Microsoft.Office.Core.MsoTriState.msoFalse
.DisplayMasterShapes =
Microsoft.Office.Core.MsoTriState.msoTrue
With .Background
.Fill.Visible =
Microsoft.Office.Core.MsoTriState.msoTrue
.Fill.ForeColor.RGB = RGB(255, 255, 255)
.Fill.BackColor.SchemeColor =
PowerPoint.PpColorSchemeIndex.ppShadow
.Fill.Transparency = 0.0#
If InStr(ActWinSlidePresentation.Name, ".pptm") > 0
Then
.Fill.UserPicture("C:\My
Documents\Powerpoint\Background\" &
Replace(ActWinSlidePresentation.Name, ".pptm", "") & "\Ultra
Background Slide.jpg")
Else
.Fill.UserPicture("C:\My
Documents\Powerpoint\Background\" &
Replace(ActWinSlidePresentation.Name, ".ppt", "") & "\Ultra Background
Slide.jpg")
End If
End With
End With
Exit Sub
NoBackgroundFound:
MsgBox("No Background Found")
End Sub