Avoiding the prompts completely by writing code with Redemption or CDO for Windows is a better solution, IMO.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Jon Lewis" wrote in message ...
Thanks Sue
What about this though?
http://www.mapilab.com/outlook/security
Sounds like it should work
"Sue Mosher [MVP-Outlook]" wrote in message
...
CDO 1.21 is subject to security prompts. I would suggest that you use either
Redemption or CDO for Windows, depending on whether you need to maintain a
record of the sent messages in the current user's folders.
"Jon Lewis @btinternet.com" jon.lewisnospam wrote in message
...
Hi Sue
I 've already read your object model guard page. I'm using your code from
http://www.outlookcode.com/d/code/htmlimg.htm
to embed an image.
I idealy want Outlook to do the sending and would like the set of messages
to be waiting in the outbox but in the italicised state i.e. when
ToolsSend
& Receive is selected they are all sent in one operation. (Auto send would
be turned off)
Sound like it's not possible without individual security prompts if
objOutlookMsg.Send is in the messageset code loop.
Manually selecting all the messages once they're in the Outlook Outbox and
chaging their state to Send would be OK but doesn't appear to be possible
either.
If I'm understanding your image embedding routine correctly, you have to
use
Outlook to add the HTML body having created the imageID using CDO.
So after the ' get the Outlook MailItem again
Set l_Msg = objApp.GetNamespace("MAPI").GetItemFromID(strEntry ID)
' add HTML content -- the IMG tag
l_Msg.HTMLBody = "IMG align=baseline border=0 hspace=0 src=cid:myident"
l_Msg.Close (olSave)
..Routine
Can I then use the not yet de-referenced MAPI.Message object to send the
email with CDO?
Many thanks for your help
Jon
"Sue Mosher [MVP-Outlook]" wrote in message
...
You need to call Send for each item to send it. See
http://www.outlookcode.com/article.aspx?ID=52 for your options with regard
to the "object model guard" security prompts.
"Jon Lewis @btinternet.com" jon.lewisnospam wrote in message
...
I'm using a mapi/cdo routine (based on code from Sue Mosher) to generate
a
mass email from a CRM Access application.
I'm looping through a recordset adding email body/attachments etc and
then
objOutlookMsg.Close (olSave)
objOutlookMsg.Move objOutlookDestFolder
for each message saves the email to the Outlook Outbox and only one
security
warning is thrown for the entire session which is fine.
However, all the messages in the Outbox are non-italicised, i.e. each one
has to be opened up and Send clicked.
If I add objOutlookMsg.Send to the loop, I get a separate security dialog
box for each email
How can I avoid this.
TIA