vbaoutlook-redemptionoutlook-2016

Wrong version of operating system when using Redemption 800401FA


I am trying to run simple script that imports .eml messages to outlook. I am using Redemption developer version. The problem occurs when i create object. I get 800401FA error which from what I understand tells me that there is redemption-outlook missmatch. I use 2016 outlook that is 32-bit and I registered both- Redemption.dll and Redemption64.dll

Script that i use:

'===================================================================
'Description: VBS script to import eml-files with Redemption.
'
'Comment: Before executing the vbs-file, make sure that the
'         Developer version of Redemption is installed.
'         http://dimastr.com/redemption/download.htm
'
' author : Robert Sparnaaij
' version: 1.1
' website: http://www.howto-outlook.com/howto/import-eml-files.htm
'===================================================================

Dim objShell : Set objShell = CreateObject("Shell.Application")
Dim objFolder : Set objFolder = objShell.BrowseForFolder(0, "Select the folder containing eml-files", 0)

Dim Item
Dim i : i = 0
If (NOT objFolder is nothing) Then
  Set WShell = CreateObject("WScript.Shell")
  Set objOutlook = CreateObject("Outlook.Application")
  Set Folder = objOutlook.Session.PickFolder
  If NOT Folder Is Nothing Then
    For Each Item in objFolder.Items
      If Right(Item.Name, 4) = ".eml" AND Item.IsFolder = False Then
        Set objPost = Folder.Items.Add(6)
        Set objSafePost = CreateObject("Redemption.SafePostItem")
        objSafePost.Item = objPost
        objSafePost.Import Item.Path, 1024
        objSafePost.MessageClass = "IPM.Note"
        ' remove IPM.Post icon
    Set utils = CreateObject("Redemption.MAPIUtils")
    PrIconIndex = &H10800003
        utils.HrSetOneProp objSafePost, PrIconIndex, 256, true 'Also saves the message
    i = i + 1
      End If
    Next

    MsgBox "Import completed." & vbNewLine & vbNewLine & "Imported eml-files: " & i & _
       vbNewLine & "Imported into: " & Folder.FolderPath, 64, "Import EML"

    Set Folder = Nothing
  Else
    MsgBox "Import canceled.", 64, "Import EML"
  End If
Else
  MsgBox "Import canceled.", 64, "Import EML"
End If

Set objFolder = Nothing
Set objShell = Nothing

Any idea what seems to be the problem?

I unregistered 64-bit version of Redemption, registered only 32-bit but now it shows 8007007E error message.


Solution

  • For everyone with the same problem- registering correct version of dll doesn't suffice. With 32-bit outlook you also need to run the script different way:

    c:\Windows\SysWow64\cscript.exe <full path to your vbs file>