G
Guest
I'm programming a COM Add-in for outlook2003. UnFortunately, the warning
dialog box always popes up what I tries to save a sent mail item
programmally.like this:
'**********************************************
Dim olApp As Outlook.Application
Dim objMailItem As Outlook.MailItem
Set olApp = Application
Set objMailItem = olApp.Session.GetDefaultFolder(olFolderSentMail).Items(1)
Call SaveMailItemAsFile(objMailItem, sFullPath)
'***********************************************
So I researched MSDN and found an example of article "What's New in
Microsoft Office Outlook 2003 for Developers?", which said that would avoid
secure warning dialog box:
Sub TrustedCode()
Dim olApp As Outlook.Application
Set olApp = Application
Dim oMail As Outlook.MailItem
Set oMail = _
olApp.Session.GetDefaultFolder(olFolderInbox).Items(1)
MsgBox oMail.SenderEmailAddress, vbInformation
End Sub
But it doesn't work, in fact. How could I do?Somebody helps me.
dialog box always popes up what I tries to save a sent mail item
programmally.like this:
'**********************************************
Dim olApp As Outlook.Application
Dim objMailItem As Outlook.MailItem
Set olApp = Application
Set objMailItem = olApp.Session.GetDefaultFolder(olFolderSentMail).Items(1)
Call SaveMailItemAsFile(objMailItem, sFullPath)
'***********************************************
So I researched MSDN and found an example of article "What's New in
Microsoft Office Outlook 2003 for Developers?", which said that would avoid
secure warning dialog box:
Sub TrustedCode()
Dim olApp As Outlook.Application
Set olApp = Application
Dim oMail As Outlook.MailItem
Set oMail = _
olApp.Session.GetDefaultFolder(olFolderInbox).Items(1)
MsgBox oMail.SenderEmailAddress, vbInformation
End Sub
But it doesn't work, in fact. How could I do?Somebody helps me.