What's the best way to save an MSO PowerPoint shape object to file for later use

I'm writing some VBA code to export and import native MSO objects (excluding media such as pictures, videos, sounds) on PowerPoint slides to and from disk. Once re-imported, objects must be editable to the full degree of the original object so the saved format must be a vector or possibly XML representation of the object.

Obviously "objects" can be anything from simple text boxes to single shapes, multiple shape selections, tables, SmartArt and groups of these types to name a few. Exporting to an enhanced meta file then importing and ungrouping seems to work in some cases but not all (tables get broken into shapes for example). Also, some of original object properties are lost such as their names.

Is there a best practice method for storing objects from a slide to disk without having to delve into the XML structure of the file (which I don't believe is possible when the file is already open anyway)?
LVL 15
Jamie GarrochSenior Technical Consultant at BrightCarbonAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jacques Bourgeois (James Burger)PresidentCommented:
Contrary to some types of objects (such as objects in the .NET environment), MSO objects where not built to be saved individually to files.

I would personally put these objects in a presentation and reload that presentation when I need to retrieve one of these. It should be easy to code some kind of Copy and Paste routine to move them from your "storage" presentation to another with all their properties intact.
Jamie GarrochSenior Technical Consultant at BrightCarbonAuthor Commented:
Thanks Jacques. I do use that mechanism in another product but was looking for something faster this time due to the sheer volume of objects to search through. I'll wait to see if there are any other suggestion as I do know of one third party solution where individual PowerPoint objects have been saved to and recalled from the cloud, presumably using XML.
Jacques Bourgeois (James Burger)PresidentCommented:
They probably read all the properties of the object and record them in a custom XML file.

When they need to reload the object, they create a new one and assign it the values read from XML.

This is basically what Formatter classes do in .NET, but this type of functionality is not built into VBA.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft PowerPoint

From novice to tech pro — start learning today.