![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I'd like to make connection from Excel to Outlook using VBA - create new mail
and send it. I did it, but before sending the mail, there always appear security warning like "A program is trying to automatically send e-mail on your behalf ....." and it needs someone to click "Yes" after about 5-6 seconds. Please, help: is there any method to override this problem and send mail automatically without any confirmations? If yes, how can i do it? |
#2
|
|||
|
|||
![]()
See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Gvaram" wrote in message ... I'd like to make connection from Excel to Outlook using VBA - create new mail and send it. I did it, but before sending the mail, there always appear security warning like "A program is trying to automatically send e-mail on your behalf ......" and it needs someone to click "Yes" after about 5-6 seconds. Please, help: is there any method to override this problem and send mail automatically without any confirmations? If yes, how can i do it? |
#3
|
|||
|
|||
![]()
Thank you Sue for a quick respons
I have found one solution - In "ThisOutlookSession" I wrote: Sub SendNewMail(NewTo As String, NewSubject As String, NewAttach As String) Dim MyOutlook As Outlook.Application Dim objMail As Outlook.MailItem Set MyOutlook = Application Set objMail = MyOutlook.CreateItem(olMailItem) With objMail .BodyFormat = olFormatHTML .To = NewTo .Attachments.Add NewAttach .Subject = NewSubject .Send End With End Sub And I called this function from Excel (VBA) by: Sub test() Call ", "Test", "C:\test.xls") End Sub This really worked - I've tested it many times, you can also chack it. Then, I saved the Project and restarted Outlook. After that it does not work(???) - "Run-time error 438" Would you be so kind and tell me how to handle This problem? Regards "Sue Mosher [MVP-Outlook]" wrote: See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Gvaram" wrote in message ... I'd like to make connection from Excel to Outlook using VBA - create new mail and send it. I did it, but before sending the mail, there always appear security warning like "A program is trying to automatically send e-mail on your behalf ......" and it needs someone to click "Yes" after about 5-6 seconds. Please, help: is there any method to override this problem and send mail automatically without any confirmations? If yes, how can i do it? |
#4
|
|||
|
|||
![]()
OK. So, I found the solution for this problem too
![]() The problem was in "Macro Security Level" - If you choose "Low" it works always without any security warnings. If you choose "Medium" - you have to "Enable Macros" every time you strat the Outlook. I think it's easiest and simpiest way to send mails without security warnings, is not it??? (of course if you have already installed some strong antivirus program!) Or there is something else ? Anyway, thank you very much "Gvaram" wrote: Thank you Sue for a quick respons I have found one solution - In "ThisOutlookSession" I wrote: Sub SendNewMail(NewTo As String, NewSubject As String, NewAttach As String) Dim MyOutlook As Outlook.Application Dim objMail As Outlook.MailItem Set MyOutlook = Application Set objMail = MyOutlook.CreateItem(olMailItem) With objMail .BodyFormat = olFormatHTML .To = NewTo .Attachments.Add NewAttach .Subject = NewSubject .Send End With End Sub And I called this function from Excel (VBA) by: Sub test() Call ", "Test", "C:\test.xls") End Sub This really worked - I've tested it many times, you can also chack it. Then, I saved the Project and restarted Outlook. After that it does not work(???) - "Run-time error 438" Would you be so kind and tell me how to handle This problem? Regards "Sue Mosher [MVP-Outlook]" wrote: See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Gvaram" wrote in message ... I'd like to make connection from Excel to Outlook using VBA - create new mail and send it. I did it, but before sending the mail, there always appear security warning like "A program is trying to automatically send e-mail on your behalf ......" and it needs someone to click "Yes" after about 5-6 seconds. Please, help: is there any method to override this problem and send mail automatically without any confirmations? If yes, how can i do it? |
#5
|
|||
|
|||
![]()
That's an excellent solution, but why not use the Selfcert.exe tool that comes with Office to digitally sign your Outlook VBA project so you can set macro security to High and not worry about it? See http://www.outlookcode.com/d/vb.htm#selfcert
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Gvaram" wrote in message ... OK. So, I found the solution for this problem too ![]() The problem was in "Macro Security Level" - If you choose "Low" it works always without any security warnings. If you choose "Medium" - you have to "Enable Macros" every time you strat the Outlook. I think it's easiest and simpiest way to send mails without security warnings, is not it??? (of course if you have already installed some strong antivirus program!) Or there is something else ? Anyway, thank you very much "Gvaram" wrote: Thank you Sue for a quick respons I have found one solution - In "ThisOutlookSession" I wrote: Sub SendNewMail(NewTo As String, NewSubject As String, NewAttach As String) Dim MyOutlook As Outlook.Application Dim objMail As Outlook.MailItem Set MyOutlook = Application Set objMail = MyOutlook.CreateItem(olMailItem) With objMail .BodyFormat = olFormatHTML .To = NewTo .Attachments.Add NewAttach .Subject = NewSubject .Send End With End Sub And I called this function from Excel (VBA) by: Sub test() Call ", "Test", "C:\test.xls") End Sub This really worked - I've tested it many times, you can also chack it. Then, I saved the Project and restarted Outlook. After that it does not work(???) - "Run-time error 438" Would you be so kind and tell me how to handle This problem? Regards "Sue Mosher [MVP-Outlook]" wrote: See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. "Gvaram" wrote in message ... I'd like to make connection from Excel to Outlook using VBA - create new mail and send it. I did it, but before sending the mail, there always appear security warning like "A program is trying to automatically send e-mail on your behalf ......" and it needs someone to click "Yes" after about 5-6 seconds. Please, help: is there any method to override this problem and send mail automatically without any confirmations? If yes, how can i do it? |
#6
|
|||
|
|||
![]()
I'll do it...
Thank you Sue "Sue Mosher [MVP-Outlook]" wrote: That's an excellent solution, but why not use the Selfcert.exe tool that comes with Office to digitally sign your Outlook VBA project so you can set macro security to High and not worry about it? See http://www.outlookcode.com/d/vb.htm#selfcert -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Gvaram" wrote in message ... OK. So, I found the solution for this problem too ![]() The problem was in "Macro Security Level" - If you choose "Low" it works always without any security warnings. If you choose "Medium" - you have to "Enable Macros" every time you strat the Outlook. I think it's easiest and simpiest way to send mails without security warnings, is not it??? (of course if you have already installed some strong antivirus program!) Or there is something else ? Anyway, thank you very much "Gvaram" wrote: Thank you Sue for a quick respons I have found one solution - In "ThisOutlookSession" I wrote: Sub SendNewMail(NewTo As String, NewSubject As String, NewAttach As String) Dim MyOutlook As Outlook.Application Dim objMail As Outlook.MailItem Set MyOutlook = Application Set objMail = MyOutlook.CreateItem(olMailItem) With objMail .BodyFormat = olFormatHTML .To = NewTo .Attachments.Add NewAttach .Subject = NewSubject .Send End With End Sub And I called this function from Excel (VBA) by: Sub test() Call ", "Test", "C:\test.xls") End Sub This really worked - I've tested it many times, you can also chack it. Then, I saved the Project and restarted Outlook. After that it does not work(???) - "Run-time error 438" Would you be so kind and tell me how to handle This problem? Regards "Sue Mosher [MVP-Outlook]" wrote: See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. "Gvaram" wrote in message ... I'd like to make connection from Excel to Outlook using VBA - create new mail and send it. I did it, but before sending the mail, there always appear security warning like "A program is trying to automatically send e-mail on your behalf ......" and it needs someone to click "Yes" after about 5-6 seconds. Please, help: is there any method to override this problem and send mail automatically without any confirmations? If yes, how can i do it? |
#7
|
|||
|
|||
![]()
Certs won't work, according to ms. From
http://msdn.microsoft.com/library/de.../odc_dsvba.asp "It should be noted that the security model for Microsoft Outlook 2002 differs from other Office XP applications. In addition to a user's security settings, described in Table 1, Outlook 2002 VBA macro projects (****regardless of whether they are digitally signed or not****) are subjected to the restrictions on certain Outlook 2002 object model property and method calls imposed by the Outlook E-mail Security Update that is an integral component of Outlook 2002. There is no way to bypass these restrictions except if a Microsoft Exchange Server administrator uses the Default Security Settings (Admin.oft) template to lower the Outlook security settings. However, this is not recommended as it also has the side effect of lowering overall security restrictions, including the ability to run viruses." |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Eliminating security warnings with Outlook Express | History Fan | Outlook Express | 16 | August 26th 06 09:43 PM |
Set Warnings Macro | Donbenz | Outlook and VBA | 7 | June 2nd 06 07:26 PM |
How to set outlook security to allow outside program to send email | Warren | Outlook - General Queries | 6 | May 25th 06 05:20 PM |
Send As Property Outlook VBA | [email protected] | Outlook and VBA | 1 | March 15th 06 05:12 PM |
overdue warnings | Ponch | Outlook - General Queries | 1 | January 23rd 06 03:06 PM |