ActiveX component error

16/12/2004 - 08:09 por Nayana | Informe spam
hai everybody,

I have written a code for accessing senderemailaddress from outlook 2002
using redemption. The code is as below:
Dim PrSenderEmail, strSenderEmail

Dim ns, itm As Object

Dim application As New Outlook.Application

Dim utilobj = Createobject(" Redemption.MAPIUtils")

ns = application.GetNamespace("MAPI")

itm = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Items(1)

PrSenderEmail = &HC1F001E

strSenderEmail = utilobj.HrGetOneProp(itm.MAPIOBJECT, PrSenderEmail)

MsgBox(strSenderEmail)



When i'm running this code i'm getting an error " Cannot create ActiveX
component".

I changed the code:

Dim utilobj = CreateObject(" Redemption.MAPIUtils")

to

Dim utilobj as new Redemption.MAPIUtils

But this time i'm getting an error as:

Additional information: COM object with CLSID
{4A5E947E-C407-4DCC-A0B5-5658E457153B} is either not valid or not
registered.

Can anyone please help me.

With Regards,

Nayana.
 

Preguntas similares