addshape gives type mismatch for msoshapechevron
I am writing VBA for MS Project to create drawing objects in a Powerpoint presentation.
Can someone tell me why this works:
objSlide.Shapes.AddShape Type:=msoShapeChevron, left:=50, top:=50, width:=50, height:=50
but this does not?
Set objSuc = objSlide.Shapes.AddShape(msoShapeChevron, 50, 50, 50, 50)
It works fine with msoTextOrientationHorizontal shape type.
I want to be able to place the shape and then modify it's parameters (like font, text, etc) and I have always used Set (and With) to do this. But I am having no luck with this or smart art.
I have powerpoint, excel and office libraries referenced.
Any help would be appreciated.