View Single Post
 
Old 05-21-2018, 06:54 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

This should give you a start

Code:
Sub addShape()

On Error Resume Next
If ActiveWindow.Selection.ShapeRange(1).HasSmartArt Then
If Err <> 0 Then
MsgBox "select smart art"
Exit Sub
End If
'so far so good
If ActiveWindow.Selection.ChildShapeRange.Count = 1 Then
'One node selected
CommandBars.ExecuteMso ("SmartArtAddShapeAfter")
Else
MsgBox "Select ONE node"
End If
End If 'not Smart art
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote