0
votes

I created a mini-program in vb net which has the ability to input manually some information in different checkbox's and then with this input information the program edit a .msg outlook template. The problem is that i have the error "Cannot create ActiveX component." in "Create Object("Redemption.RDOSession"). (Please find the screenshot for more details).Cannot create ActiveX component

Could please tell me if you have any idea on how to solve this problem? or if you have an alternative way instead of this.

The dll's that i use are:

Imports Outlook = Microsoft.Office.Interop.Outlook

Imports Redemption

Imports System

Imports System.IO

Imports System.Text

Imports MailMessage = Aspose.Network.Mail.MailMessage

Imports Response

Imports System.Globalization

Interop.Redemption

Microsoft Outlook 16.0 Object Library

Microsoft HTML Object Library

InteropExtension 1.0 Type Library

OLE Automation

OutlookAddinLib

Redemption Outlook and MAPI COM Library


Here are some of the code that we have the problem:

'EDIT .MSG files

'Dim OpenPath As String = TextBox5.Text & TextBox1.Text & "\" & EmailUpdate_Renamed

    'Dim Sess As RDOSession
    'Dim myMsg As RDOMail

    Dim mySubject As String
    Dim myToo As String
    Dim myCC As String
    Dim Sess As Object
    Sess = CreateObject("Redemption.RDOSession")
    'Sess.MAPIOBJECT = Application.ProductName

    Dim myMsg As Object = Sess.GetMessageFromMsgFile(OpenPath)

    'myMsg = Sess.GetMessageFromMsgFile(OpenPath)
    'myMsg.Display()

    'EDIT SUBJECT
    mySubject = myMsg.Subject
    myMsg.Subject = Replace(mySubject, "Number", TextBox7.Text)
    mySubject = myMsg.Subject
    myMsg.Subject = Replace(mySubject, "Direction", ComboBox1.SelectedItem)
    mySubject = myMsg.Subject
    myMsg.Subject = Replace(mySubject, "Name", TextBox1.Text)

    'EDIT TO
    myToo = myMsg.To
    myMsg.To = TextBox9.Text

    'EDIT CC
    myCC = myMsg.CC
    myMsg.CC += ";" & TextBox10.Text

    'SAVE
    myMsg.Save()
1

1 Answers

0
votes

If you are using Redemption, it actually needs to be installed. The dll with the appropriate bitness (redemption.dll for 32 bit and redemption64.dll for 64 bit) van be copied to any folder and installed using regsvr32.exe (you do not need admin privileges when doping that).

Also make sure the bitness of your app matches the bitness of Outlook/MAPI system - see http://www.dimastr.com/redemption/faq.htm#ErrorCreatingRedemptionObject