ConfigurationManager Property fails to return a COM component

SolidWorks.Interop.swdocumentmgr Namespace > ISwDMDocument Interface : ConfigurationManager Property (ISwDMDocument)

Error HRESULT E_FAIL has been returned from a call to a COM component.   at SwDocumentMgr.ISwDMConfigurationMgr.GetConfigurationNames()at GetReferences.Program.GetPartOrAssemblyReferences(SwDMDocument dmDoc)at GetReferences.Program.Main(String[] args)

On 20 files in 26,000 I am getting the previious error.  The files are SolidWorks 2011 version.  I am not sure what do with it.

SolidworksApi macros