• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Shapes.AddPicture Method (PowerPoint)

TAEHO

New Member
Hi,

With regard to the macro for ppt, I find example macro in below site.

https://msdn.microsoft.com/ko-kr/library/office/ff745953.aspx

Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddPicture FileName:="c:\microsoft office\" & _
"clipart
\music.bmp", LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
Left:=100, Top:=100, Width:=70, Height:=70


If the file location of ppt file including above macro and bmp file is changed, Do I have to modify the FileName(red text) every time the location of the ppt file changes?
If yes, there is no way a more comfortable?

I would like to know the other method on the assumption that the ppt and bmp file are always saved same folder.

Happy New Year!
 
The location is Red above is the location of the graphic file Music.bmp

It has nothing to do with the location of your files
 
Back
Top