addshape gives type mismatch for msoshapechevron

Was this post useful to you?

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.
Thanks.
Rick

rnadeau's picture
rnadeau
Thu, 01/31/2013 - 23:14

Post your reply

Filtered HTML

  • Allowed HTML tags: <b> <br> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.