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 - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Mapi/CDO Outlook emailing



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 10th 08, 10:59 AM posted to microsoft.public.outlook.program_vba,microsoft.public.outlook
Jon Lewis
external usenet poster
 
Posts: 9
Default Mapi/CDO Outlook emailing

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


Ads
  #2  
Old June 10th 08, 01:48 PM posted to microsoft.public.outlook.program_vba,microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Mapi/CDO Outlook emailing

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.

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


  #3  
Old June 10th 08, 03:46 PM posted to microsoft.public.outlook.program_vba,microsoft.public.outlook
Jon Lewis
external usenet poster
 
Posts: 9
Default Mapi/CDO Outlook emailing

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.

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




  #4  
Old June 10th 08, 05:01 PM posted to microsoft.public.outlook.program_vba,microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Mapi/CDO Outlook emailing

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.

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




  #5  
Old June 10th 08, 11:06 PM posted to microsoft.public.outlook.program_vba,microsoft.public.outlook
Jon Lewis[_2_]
external usenet poster
 
Posts: 3
Default Mapi/CDO Outlook emailing

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.

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






  #6  
Old June 10th 08, 11:23 PM posted to microsoft.public.outlook.program_vba,microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Mapi/CDO Outlook emailing

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






  #7  
Old June 11th 08, 02:04 PM posted to microsoft.public.outlook.program_vba,microsoft.public.outlook
Jon Lewis
external usenet poster
 
Posts: 9
Default Mapi/CDO Outlook emailing

I'm sure you're right Sue but as I understand it CDO for Windows bypasses
Outlook completely and Redemption costs $200 even for small internal
application use.

Thanks for your help

"Sue Mosher [MVP-Outlook]" wrote in message
...
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








 




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
Emailing pictures on Outlook Express 6 gobluejoe Outlook Express 7 June 28th 07 09:23 PM
Emailing by VBA program using Outlook Altair1972m Outlook and VBA 1 May 10th 07 09:16 PM
Emailing a Web Page from Outlook samdev Outlook - General Queries 2 September 12th 06 03:12 AM
Emailing from Outlook Headache Outlook - General Queries 0 March 6th 06 10:16 PM
emailing from outlook glwood Outlook - General Queries 1 January 10th 06 05:37 AM


All times are GMT +1. The time now is 06: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.