简体   繁体   中英

Outlook Redemption error in MS Access: ActiveX component can't create object

Code:

    Dim Application As Object, namespace As Object
    Set Application = CreateObject("Outlook.Application")
    Set namespace = Application.GetNamespace("MAPI")
    namespace.Logon

    Set safeItem = CreateObject("Redemption.SafeMailItem") ' Error here!

Normally this code works fine on most of my boxes -- but in this case I am running this in MS Access 2010 (64-bit) if it matters.

But the line where safeItem is assigned, I get the error that "ActiveX component cannot create object." What does this even mean? Why can't I create the object? The reference to Redemption seems to be okay / doesn't show as MISSING or anything.

I Google this error and there seems to be numerous possible causes since the error is so vague. Is there a well-known reason for this particular instance?

确保Outlook的精确性推动Access的精确性-有关更多详细信息,请参见http://www.dimastr.com/redemption/faq.htm#ErrorCreatingRedemptionObject

The creatobject call can throw a variety including Automation Error (-2146232576) amongst others. It has been my experience that when a piece of software runs fine on one PC and not another, and the error is caused by a creatobject call then the culprit is usually a missing or incorrectly registered DLL.

The quick way to solve it (particularly in Windows 10) that I have found is to open Windows Features and if.NetFramework 3.5 is not selected, then select it and click OK. If.Netframework 3.5 is selected, then unselect it and click OK. reboot, return to Windows Features, and reselect.NetFramework 3.5 and click OK. This will cause Windows to install and register all the required DLLs and other components.

You should be right after that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM