J
Johnny E Jensen
Hello Group
I'ev made a rather large application in VB6 and wanted to test it against
Outlook 2007, the appliation crashes when it uses an object like this: (all
works fine with OL 2000-2003)
Private WithEvents m_OLMail As Outlook.MailItem
Public Function InitMail(Receiver as String) As Boolean
Dim olapp As Outlook.Application
On Error GoTo ErrHandler
InitMail = False
Set olapp = New Outlook.Application
Set m_OLMail = olapp.CreateItem(olMailItem) <----- After this it crashes
and VB6 ends
m_OLMail.To = Receiver
m_OLMail.Display
InitMail = True
ExitPoint:
On Error GoTo 0
Exit Function
ErrHandler:
Resume ExitPoint
End Function
Any suggestions?
Kind regards
Johnny Jensen
I'ev made a rather large application in VB6 and wanted to test it against
Outlook 2007, the appliation crashes when it uses an object like this: (all
works fine with OL 2000-2003)
Private WithEvents m_OLMail As Outlook.MailItem
Public Function InitMail(Receiver as String) As Boolean
Dim olapp As Outlook.Application
On Error GoTo ErrHandler
InitMail = False
Set olapp = New Outlook.Application
Set m_OLMail = olapp.CreateItem(olMailItem) <----- After this it crashes
and VB6 ends
m_OLMail.To = Receiver
m_OLMail.Display
InitMail = True
ExitPoint:
On Error GoTo 0
Exit Function
ErrHandler:
Resume ExitPoint
End Function
Any suggestions?
Kind regards
Johnny Jensen