VBA - Powerpoint freeform object nodes

M

Madla

I'm wondering why a freeform object that I selected in a Powerpoint
slide has five visual handles (nodes) but when I step through the shape
with VBA it reports 18 handles/nodes.

I'm trying to recreate the selected shape with VBA, but wonder if I
could be able to simplyfy the creation of the object.

Thanks...martin
 
B

B

Try this simple little VBA routine to duplicate a selected shape during an
active presentation. Note that you will have to assign a Action setting to
run the macro.

B

Sub DupIt(oShp As Shape)
With ActivePresentation. _
Slides(SlideShowWindows(1).View _
.CurrentShowPosition)
.Shapes(oShp.Name).Copy
.Shapes.Paste
End With
End Sub
 
S

Shyam Pillai

Martin,
Use the following to duplicate the selected shape or range.

ActiveWindow.Selection.ShapeRange.Duplicate
 
M

Madla

I'm really trying to create objects from scratch when a user runs a
macro. I'm just drawing the shapes by hand first so I can figure out
where the points are so I can recreate them in VBA code.

Any further ideas?...martin
 
M

Madla

I've played around with this some more.
In the code snippet below I create a simple shape and then immediately
read all the nodes in it. I end up what seems to me always three times
as many nodes than what I drew.
Does anybody understand this better and can explain how to handle these
things better?

Thanks again...martin

'=================beginn code===========
dim aShape as shape

With currSlide.Shapes.BuildFreeform(msoEditingAuto, x + 10, y) 'top
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top