![]() |
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'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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mapi/CDO Outlook emailing | Jon Lewis | Outlook - General Queries | 6 | June 11th 08 02:04 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 |