How can i modify the below line of code to give me a FileDialog box to prompt the user for a
selection of a jpg if it is not known ?
Sub AddPicture()
' Macro recorded 30/01/2007 by Corey
ActiveWindow.Selection.SlideRange.Shapes.AddPicture(FileName:="\\Stserver\IMG_0034.jpg",
LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, Left:=-183, Top:=49, Width:=909,
Height:=682).Select
ActiveWindow.Selection.SlideRange.Shapes.AddPicture
With ActiveWindow.Selection.ShapeRange
.Fill.Transparency = 0#
.Height = 226.75
.Width = 302.38
End With
ActiveWindow.Selection.ShapeRange.IncrementLeft 295
ActiveWindow.Selection.ShapeRange.IncrementTop 235
With ActiveWindow.Selection.ShapeRange
.Fill.Transparency = 0#
.Line.Weight = 1.25
.Line.Style = msoLineThinThin
.Line.Visible = msoTrue
.Line.ForeColor.RGB = RGB(255, 51, 0)
.Line.BackColor.RGB = RGB(255, 255, 255)
End With
End Sub
Corey....
Shyam Pillai - 30 Jan 2007 05:21 GMT
You haven't mentioned which version of PowerPoint.
Regards,
Shyam Pillai
Animation Carbon - http://www.animationcarbon.com
> How can i modify the below line of code to give me a FileDialog box to
> prompt the user for a
[quoted text clipped - 25 lines]
>
> Corey....
Steve Rindsberg - 30 Jan 2007 16:57 GMT
> How can i modify the below line of code to give me a FileDialog box to prompt the user for a
> selection of a jpg if it is not known ?
Have a look here:
http://vbnet.mvps.org/
and search for "common dialog"
It's a bit tricky if you've never used it before, but the same code will work in any version of
PowerPoint (or other VBA-enabled Office apps, or VB or ....)
> Sub AddPicture()
> ' Macro recorded 30/01/2007 by Corey
[quoted text clipped - 20 lines]
>
> Corey....
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================