Thread: [Solved] Convert To Freeform
View Single Post
 
Old 02-25-2012, 01:44 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

You can convert a selected shape to a frreform using the executemso method but I suspect this isn't really what you are trying to do so I have also added code to (I think) duplicate what your code does.
[CODE]Sub ConvertFF()
If ActiveWindow.Selection.Type <> ppSelectionShapes Then Exit Sub
Application.CommandBars.ExecuteMso ("ShapeConvertToFreeform")
End Sub[CODE]

Code:
Sub ungroupEMF()
Dim oshp As Shape
Dim oshpR As ShapeRange
Dim osld As Slide
On Error Resume Next
If ActiveWindow.Selection.Type <> ppSelectionShapes Then Exit Sub
Set osld = ActiveWindow.View.Slide
Set oshp = ActiveWindow.Selection.ShapeRange(1)
oshp.Copy
osld.Shapes.PasteSpecial(ppPasteEnhancedMetafile).Select
With ActiveWindow.Selection.ShapeRange
.Left = oshp.Left
.Top = oshp.Top
oshp.Delete
.Ungroup.Select
.Ungroup.Select
End With
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote