Retrieve background pic

E

Edward

IS it possible to retrieve background pic programatically ? after we insert a
pic in background ( slide or a cell) we don't have option to remove it we can
only replace it with another pic , I couldn't find any VBA method to access
to background pic and delete it. Am I right on my assumption that we can't
retrieve background pic?
 
J

John Wilson

As Steve says there's no direct way to get the pic in vba

This might work though (assumes pic is on slide 1)

Sub getbackground()
Dim osld As Slide
Dim i As Integer
ActivePresentation.Slides(1).Duplicate
Set osld = ActivePresentation.Slides(1)
For i = osld.Shapes.Count To 1 Step -1
osld.Shapes(i).Delete
Next i
osld.Export "Insert your Path to save.jpg", _
"jpg", ActivePresentation.PageSetup.SlideWidth, _
ActivePresentation.PageSetup.SlideHeight
osld.Delete
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top