That's most likely a security issue.
If you want to create an ActiveX component, you have to add the permissions
Take a look at George's answer:
By the way, I would recommend using the Inventor Apprentice Library. It
does most of the things Inventor does but it is much quicker.