simplify putting a picture in background in macro

B

BenB

i just want to write a simple macro which opens a designated folder on the
persons computer with a file picker dialog with a jpg filter or something and
then dumps that jpg into the background of the currently selected slide. how
do i refer to the background of the slide to insert a picture in it?
 
S

Shyam Pillai

The structure is as follows:

ActivePresentation.Slides(1).FollowMasterBackground = msoFalse
With ActivePresentation.Slides(1).Background.Fill
.Visible = msoTrue
.BackColor.SchemeColor = ppAccent1
.Transparency = 0#
.UserPicture ("C:\Under Development\My
Pictures\Friends\DSC00881.JPG")
End With
Replace all references to the active slide with your respective slide and
set the path to your desired image.
 

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