How do I get customproperties

How do I get CustomProperties without open the file i solidworks?

and how do I get the customproperties from a open part or assembly?

I am using VB 2008

SolidworksApi macros