Automation error %1 is not a valid Win32 application

  • Thread starter Thread starter David Whicker
  • Start date Start date
D

David Whicker

This is a good one to hit on one of those late night deadline beating
sessions!

I have a VB6 ActiveX ocx file which contains a customised Outlook
PropertyPages which has started to bomb on the line:

Set objApp = CreateObject("Outlook.Application")

with the error:

Run-time error '-2147024703 (800700c1)

Automation error


Annoyingly this works perfectly on some PCs.

I took things back to basics and tried Randy Byrnes example
"SampleOptionsPage" and this still bombs on the same line with the
same message.

His code is shown below:

Private Sub cmdFolder_Click()
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim flr As Outlook.MAPIFolder
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set flr = objNS.PickFolder
If flr Is Nothing Then
Exit Sub
Else
txtFolder = GetFolderPath(flr)
End If
End Sub

Any help to resolve this would be gratefully received!

Thanks in advance,

David Whicker
(e-mail address removed)
 
Back
Top