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

Status
Not open for further replies.
D

Daniel

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.
 
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

"Daniel" <donotreply2me[at]yahoo[dot]com> wrote in message

news:OgbQBX9kKHA.4500@TK2MSFTNGP06.phx.gbl...
> 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?
 
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 = "HelpDesk@*********.com"

objMessage.To = "*******@**********.com"

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..
 
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

"Daniel" <donotreply2me[at]yahoo[dot]com> wrote in message

news:uQmTTGGlKHA.4772@TK2MSFTNGP04.phx.gbl...
> 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 = "HelpDesk@*********.com"
> objMessage.To = "*******@**********.com"
> 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..
 
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 = "mailto:Sdevivo@midwestcontrolcorp.com"

> 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.
 
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

"Daniel" <donotreply2me[at]yahoo[dot]com> wrote in message

news:ezRSSPHlKHA.5520@TK2MSFTNGP06.phx.gbl...
> 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 = "mailto:Sdevivo@midwestcontrolcorp.com"
> .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 https://forums.slipstick.com
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
V how to switchoff program access message in outlook 2003 Outlook VBA and Custom Forms 1
J Program Compatibility Issue - Outlook 2003 BCM BCM (Business Contact Manager) 4
D Wishlist How to use 'app password' in Outlook 2003 after Google pulled plug on "less secure apps" Using Outlook 2
J Outlook 2003 .pst Will Not Restore Completely to Outlook 2019 Using Outlook 5
D Outlook 2003 Mail Fails Using Outlook 1
D Wrong email address in Outlook 2003 "From" tab in new outgoing emails Using Outlook 4
V Outlook 2003 and Windows 11 Using Outlook 4
glnz Moving from Outlook 2003 to MS365 Outlook - need basics Using Outlook 4
I Outlook 2003 shows html code when To: field is empty Using Outlook 7
B Outlook 2003 email sending & receiving suddenly stopped working Using Outlook 3
H Outlook 2003 find by "has attachment" Using Outlook 1
glnz How set up new IMAP on Outlook-Office 365 and merge in pst from Outlook 2003 for same two email accounts? Using Outlook 5
P Import Categories from Outlook 2003 Using Outlook 8
V Outlook 2003 problem with Windows 10 Creators Update 1709 Using Outlook 0
M Outlook 2003 pictures - some visible, some not Using Outlook 0
S Outlook 2003 to Outlook 2013 pst file Using Outlook 5
O Memory Leak in Outlook 2003 Using Outlook 3
W Changing looks of emails in Outlook 2003 Using Outlook 0
O Outlook 2003 can't send, but settings seem OK Using Outlook 1
P URL Hyperlink not working correctly in Outlook 2003 Using Outlook 10
O Outlook 2003 can't open contacts. Using Outlook 2
O Promoting Outlook 2003 User Templates Using Outlook 1
O W-a-a-y too many PSTs (Outlook 2003) Using Outlook 0
J Outlook 2003-2010 PST Field Editor Using Outlook 1
P Outlook 2003 - Do I need a new profile? Using Outlook 2
E Want to Import Outlook 2003 pst files to later version Using Outlook 6
A error message outlook 2003 Using Outlook 1
B Seeking advice now Outlook 2003 is unsupported by Exchange Using Outlook 4
O Change Debit to Credit in Outlook 2003? Using Outlook 1
J problems downloading POP3 emails to Outlook 2003 Using Outlook 1
G Outlook 2003 VBA Won't Run In Outlook 2010 Outlook VBA and Custom Forms 4
P Outlook 2003 - possible to recreate corrupt account? Using Outlook 3
Calvyn Outlook 2003 cannot import .vcs subject Using Outlook 1
T Query about one aspect of migrating .pst files from Outlook 2003 to Outlook 2013 Using Outlook 5
C Outlook 2003 contacts Using Outlook 1
G Configuring Outlook 2003 for Gmail with both pop3 & imap4 accounts Using Outlook 1
M HELP--Extract Data from 2003 outlook transfer to excel spreadsheet Using Outlook 1
V Outlook 2003 editing problem Using Outlook 4
X Outlook 2003 not sending all of the new email message Using Outlook 1
2 How to use outlook 2003 calendar in always offline mode Using Outlook 0
G Outlook 2003 I need to move email to folder based on subject, using wild card Using Outlook 0
G outlook 2013 - Open In Outlook 2003 Using Outlook 1
A Exchange 2003 Outlook 2010 64 Bit- AutoDiscover Connection Err - Certificate Exchange Server Administration 9
T Use Outlook 2003 with Office 2013 Using Outlook 1
D Outlook 2003 contact folder opend in scrolled down position Using Outlook 2
O Need advice ASAP! Outlook 2003. Using Outlook 1
H Custom Contact form not working in Outlook 2003 Using Outlook 3
O Outlook 2003 forms problem Using Outlook 3
O Duplicate folders in Outlook 2003 Using Outlook 3
O Moving OUtlook 2003 from bad XP to Win 7 Pro 64 -- URGENT! Using Outlook 8

Similar threads

Back
Top