![]() |
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 want to get an email when a new post is posted and I got that to work but I keep getting "A program is trying to access e-mail addresses" dialog box and I have to keep pressing Yes for it to send the email. Is there away to get around that?
Just so you know the "Show number of unread items" in properties is grayed out. |
Ads |
#2
|
|||
|
|||
![]()
See http://www.outlookcode.com/article.aspx?ID=52 for your options with
regard to the "object model guard" security prompts. If you need more assistance, tell us what kind of application this is (VBA, VSTO, VB6, etc.) and show the relevant code. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Daniel" donotreply2me[at]yahoo[dot]com wrote in message ... I want to get an email when a new post is posted and I got that to work but I keep getting "A program is trying to access e-mail addresses" dialog box and I have to keep pressing Yes for it to send the email. Is there away to get around that? |
#3
|
|||
|
|||
![]()
After reading that page I changed my code to this:
Sub Mail() If Item.Userproperties("ID") = "" Then Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "New Post in HelpDesk Folder" objMessage.From = " objMessage.To = " objMessage.TextBody = "There's a new Post in the HelpDesk Folder" objMessage.Send --- I get the error on this line. End IF End Sub But when I try to send I get this error: The SendUsing configuration value is invalid. I'm using outlook vbscript.. Submitted using http://www.outlookforums.com |
#4
|
|||
|
|||
![]()
That code assumes that you have an SMTP server running on your own machine.
If you want to send through a remote SMTP server, you need to add other code, as described in the article at http://www.paulsadowski.com/WSH/cdo.htm under the sections "Sending a text email using a remote server" and "Sending a text email using authentication against a remote SMTP server." It might be possible to modify your original code to work without trigging security prompts, but since we don't know what that code was, that's only speculation. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Daniel" donotreply2me[at]yahoo[dot]com wrote in message ... After reading that page I changed my code to this: Sub Mail() If Item.Userproperties("ID") = "" Then Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "New Post in HelpDesk Folder" objMessage.From = " objMessage.To = " objMessage.TextBody = "There's a new Post in the HelpDesk Folder" objMessage.Send --- I get the error on this line. End IF End Sub But when I try to send I get this error: The SendUsing configuration value is invalid. I'm using outlook vbscript.. Submitted using http://www.outlookforums.com |
#5
|
|||
|
|||
![]()
Here's the original code:
Sub Mail() Dim objOutlook Dim objOutlookMsg If Item.Userproperties("ID") = "" Then Set objOutlook = CreateObject("Outlook.Application") Set objOutlookMsg = objOutlook.CreateItem(0) With objOutlookMsg .To = " .Subject = "New Post in HelpDesk" .Send End With Set objOutlookMsg = Nothing Set objOutlook = Nothing End IF End Sub I had to scrap this because when I tried it on another computer that has outlook 2003. I got this error message: 'ActiveX' Component cannot create object: Outlook.Application. Submitted using http://www.outlookforums.com |
#6
|
|||
|
|||
![]()
Never use this statement in Outlook form or VBA code:
Set objOutlook = CreateObject("Outlook.Application") Instead, as the article I suggested explains, you should derive all Outlook objects from the intrinsic Application object: Set objOutlook = Application -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Daniel" donotreply2me[at]yahoo[dot]com wrote in message ... Here's the original code: Sub Mail() Dim objOutlook Dim objOutlookMsg If Item.Userproperties("ID") = "" Then Set objOutlook = CreateObject("Outlook.Application") Set objOutlookMsg = objOutlook.CreateItem(0) With objOutlookMsg .To = " .Subject = "New Post in HelpDesk" .Send End With Set objOutlookMsg = Nothing Set objOutlook = Nothing End IF End Sub I had to scrap this because when I tried it on another computer that has outlook 2003. I got this error message: 'ActiveX' Component cannot create object: Outlook.Application. Submitted using http://www.outlookforums.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2003:A program is trying to access e-mail addresses... | constructor | Outlook - General Queries | 4 | April 18th 08 12:11 PM |
A program is trying to access e-mail addresses... | [email protected] | Outlook and VBA | 5 | September 27th 07 03:13 PM |
Program trying to access Outlook e-mail addresses. Cannot close. | Barbara A | Outlook - Using Contacts | 3 | August 7th 07 12:32 PM |
A program is trying to access e-mail addresses Outlook 2003 sp2 | Royce | Outlook - Installation | 2 | March 1st 07 04:45 AM |
A program is trying to access e-mail addresses you have stored... | Ted | Outlook - General Queries | 2 | January 11th 07 03:27 PM |