Inserting a picture into shape quickly

ando185

New Member
Joined
Jun 19, 2013
Messages
8
I am working with Excel for Mac 2011.

In the SmartArt section they have a picture tab, where you can select from various formats. None of these formats fit my needs. So my question is, can I customize these?

If not, can I add a macro to a shape so that it can do what the picture boxes do, opening the folder to select a photo, and put it into excel in the shape, location, and size of the shape?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

patel45

Well-known Member
Joined
Jul 15, 2012
Messages
1,953
This is for windows
Code:
Sub AddPic()
Dim myPicture As String
    myPicture = Application.GetOpenFilename _
    ("Pictures (*.gif; *.jpg; *.bmp; *.tif),*.gif; *.jpg; *.bmp; *.tif", _
    , "Select Picture to Import")
    ActiveSheet.Shapes.Range("ShapeName").Fill.UserPicture PictureFile:=myPicture
End Sub
 

ando185

New Member
Joined
Jun 19, 2013
Messages
8
This is for windows
Code:
Sub AddPic()
Dim myPicture As String
    myPicture = Application.GetOpenFilename _
    ("Pictures (*.gif; *.jpg; *.bmp; *.tif),*.gif; *.jpg; *.bmp; *.tif", _
    , "Select Picture to Import")
    ActiveSheet.Shapes.Range("ShapeName").Fill.UserPicture PictureFile:=myPicture
End Sub

This gave me a error. Not sure how to map the mac finder to open up the file...
 

Watch MrExcel Video

Forum statistics

Threads
1,129,445
Messages
5,636,318
Members
416,912
Latest member
danluk12

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top