![]() |
#4
|
|||
|
|||
![]()
It's close but it needs a little more error checking
Code:
Sub addShape() On Error Resume Next If ActiveWindow.Selection.ShapeRange(1).HasSmartArt Then If Err <> 0 Then MsgBox "Select smart art" Err.Clear Exit Sub End If 'so far so good Debug.Print ActiveWindow.Selection.ChildShapeRange.Count If Err <> 0 Then MsgBox "No nodes selected" Err.Clear Exit Sub End If If ActiveWindow.Selection.ChildShapeRange.Count = 1 Then CommandBars.ExecuteMso ("SmartArtAddShapeAfter") 'One node selected Else MsgBox "Select ONE node" End If End If 'not Smart art End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Smart Art Org Chart - Is it possible to give a custom RGB color for each level within the hiearchy | R Mohan | PowerPoint | 7 | 04-30-2018 06:37 AM |
Struggling with Smart Art | R Mohan | PowerPoint | 5 | 04-24-2018 08:35 AM |
Dynamic Smart Shapes? | cloudforgiven | Excel | 0 | 11-21-2016 10:24 AM |
![]() |
AD1983 | PowerPoint | 2 | 10-18-2016 06:26 AM |
Is there a smart art that would do this? | raindog308 | Drawing and Graphics | 0 | 09-24-2010 04:23 PM |