Thread: [Solved] Convert To Freeform
View Single Post
 
Old 02-22-2012, 12:57 PM
excelledsoftware excelledsoftware is offline Windows 7 64bit Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default Convert To Freeform

There are such great answers on this forum. I have a macro (pasted below) that I use to take an autoshape and convert it to points. I know that sendkeys is not ideal to use but since PasteSpecial is not possible to record this is what I use.
The macro will cut the shape then paste special it as an enhanced metafile.
Then the macro will ungroup the metafile a prompt will come asking to convert it to a msoffice drawing object which the macro will say yes to, then the macro ungroups it again and then deletes the other 2 shapes from the conversion.
Any suggestions on how to accomplish the same thing without using sendkeys. The last 2 shapes deletion is not that important its just nice to not have to delete the fill and then the blank square each time.

Sub CTP()
SendKeys "^{x}", wait
SendKeys "%(es)", wait
SendKeys "{down 2}", wait
SendKeys "{enter}", wait
SendKeys "^+h", wait
SendKeys "{y}", wait
SendKeys "^+h", wait
SendKeys "+{tab 2}", wait
SendKeys "{del}", wait
SendKeys "+{tab}", wait
SendKeys "{del}", wait
SendKeys "+{tab}", wait
End Sub
Reply With Quote