Sanjun Chen
Posts: 2
Joined: 2007-01-08
|
Hi,
I installed the OSM, but I still get the outlook warning window and ask me to press yes or no. Here is the simple code I am using to automatically send the excel file.
Sub SendItOut()
requestormail = "sc49@duke.edu"
Message1 = "Sheet Request"
Dim SecurityManager As New OutlookSecurityManager
Set OutlookApp = CreateObject("Outlook.Application")
Call SecurityManager.ConnectTo(OutlookApp)
SecurityManager.DisableOOMWarnings = True
ActiveWorkbook.SendMail Recipients:=requestormail, Subject:=Message1
End Sub
Thanks for your help
Sanjun
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Sanjun,
The Workbook.SendMail method uses Simple MAPI and not Outlook Object Model. Please try the following code and let me know about the results.
Sub SendItOut()
requestormail = "sc49@duke.edu"
Message1 = "Sheet Request"
Dim SecurityManager As New OutlookSecurityManager
SecurityManager.Disable[B]SMAPI[/B]Warnings = True
ActiveWorkbook.SendMail Recipients:=requestormail, Subject:=Message1
SecurityManager.Disable[B]SMAPI[/B]Warnings = False
End Sub
P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
|
|
Sanjun Chen
Posts: 2
Joined: 2007-01-08
|
Hi Dmitry,
Thanks. It works great.
Sanjun
|
|