W
Wolfram Humann
I hope I didn't strip down this test case too much...
I have a sub:
Sub ShowMailSubject(mail As MailItem)
MsgBox (mail.Subject)
End Sub
Somewhere else I have this code:
Dim myEmail As MailItem
ShowMailSubject (myOlApp.ActiveInspector.CurrentItem) ' Works
Set myEmail = myOlApp.ActiveInspector.CurrentItem
ShowMailSubject (myEmail) ' Fails
The first call to ShowMailSubject works and displays the subject as
expected. The second one fails with "Run-time error '424': Object
required".
Any Idea why?
Thanks,
Wolfram
I have a sub:
Sub ShowMailSubject(mail As MailItem)
MsgBox (mail.Subject)
End Sub
Somewhere else I have this code:
Dim myEmail As MailItem
ShowMailSubject (myOlApp.ActiveInspector.CurrentItem) ' Works
Set myEmail = myOlApp.ActiveInspector.CurrentItem
ShowMailSubject (myEmail) ' Fails
The first call to ShowMailSubject works and displays the subject as
expected. The second one fails with "Run-time error '424': Object
required".
Any Idea why?
Thanks,
Wolfram