A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook 2003 - A program is trying to access e-mail addresses



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 12th 10, 11:22 PM posted to microsoft.public.outlook.program_forms
Daniel
external usenet poster
 
Posts: 19
Default Outlook 2003 - A program is trying to access e-mail addresses

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  
Old January 12th 10, 11:33 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default Outlook 2003 - A program is trying to access e-mail addresses

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  
Old January 13th 10, 04:03 PM posted to microsoft.public.outlook.program_forms
Daniel
external usenet poster
 
Posts: 19
Default Outlook 2003 - A program is trying to access e-mail addresses

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  
Old January 13th 10, 04:17 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default Outlook 2003 - A program is trying to access e-mail addresses

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  
Old January 13th 10, 06:14 PM posted to microsoft.public.outlook.program_forms
Daniel
external usenet poster
 
Posts: 19
Default Outlook 2003 - A program is trying to access e-mail addresses

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  
Old January 13th 10, 06:28 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default Outlook 2003 - A program is trying to access e-mail addresses

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 01:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.