Run Macro Error

When I try to run a macro directly within a SW part file, I am getting the following error:

"filename.swp has wrong format and cannot be converted to VBA macro file"

But if I open in macro editor and run from there, it is working fine.

Any solutions please,

Thanks

SolidworksApi macros