Exporting a SmartArt graphic

pbassett

Active Member
Joined
May 5, 2004
Messages
358
I dynamically generate Org Charts using the SmartArt CirclePictureHierarchy object, but I am unable to export them as PDF files in code.
I thought I could use the same code as I use to export a Chart, but that didn't work.
I believe exporting Shapes is doable, but I can't capture the code in a macro when I select Design->Convert to Shapes.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
The SmartArt is a shape, so you can copy the shape like this...

Code:
activesheet.shapes("Diagram 1").CopyPicture

Then you can paste the picture into your chart so that it can be exported. Change the name of the shape accordingly.

Hope this helps!
 
Last edited:
Upvote 0
Thanks! Also the chart initially contained data so I needed to empty it out with
Code:
ActiveChart.ChartArea.Clear
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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
Back
Top