outlook-object-model

Outlook Object Model - Detecting if email has been sent

安稳与你 提交于 2019-11-30 18:43:44
问题 I have the following code in my test Delphi 2006 BDS application: procedure TForm1.Button1Click(Sender: TObject); const olMailItem = 0; var Outlook: OleVariant; vMailItem: variant; begin Outlook := CreateOleObject('Outlook.Application'); vMailItem := Outlook.CreateItem(olMailItem); try vMailItem.Recipients.add('anemailaddress@gmail.com'); vMailItem.Display(True); -- outlook mail message is displayed modally except end; VarClear(Outlook); end; I need to be able to detect whether the user sent

Detecting Outlook autoreply/out-of-office emails

房东的猫 提交于 2019-11-28 18:45:27
Been googling for this and haven't found anything ... Does anybody know if there is a way, given an Outlook email item, to detect whether it was sent by the "Out Of Office Assistant"? Is there any property that Outlook sets on the object, or any header information, that identifies an email as such? I was hoping not to have to parse the subject line for "Out Of Office", etc. It would be great if there were some standard, so autoreplies from other email services (like Gmail) could also be detected, but for me Outlook is the highest priority. There is a header field ( http://www.iana.org

Detecting Outlook autoreply/out-of-office emails

冷暖自知 提交于 2019-11-27 11:47:30
问题 Been googling for this and haven't found anything ... Does anybody know if there is a way, given an Outlook email item, to detect whether it was sent by the "Out Of Office Assistant"? Is there any property that Outlook sets on the object, or any header information, that identifies an email as such? I was hoping not to have to parse the subject line for "Out Of Office", etc. It would be great if there were some standard, so autoreplies from other email services (like Gmail) could also be

How to add an embedded image to an HTML message in Outlook 2010

烂漫一生 提交于 2019-11-26 21:44:04
问题 I have Office 2003 VBA code that uses the technique described here to embed an image in an HTML message using undocumented MAPI properties and CDO 1.21. CDO 1.21 is no longer supported, but according to MSDN, most of its functionality is now incorporated into the Outlook 2010 object model. Where can I find a sample that embeds images in an Outlook 2010 message using the Outlook 2010 object model? 回答1: Found the answer here. The key bits being: Const PR_ATTACH_MIME_TAG = "http://schemas

Can I iterate through all Outlook emails in a folder including sub-folders?

匆匆过客 提交于 2019-11-26 03:40:00
问题 I have a folder which contains a number of emails and sub-folders. Within those sub-folders are more emails. I\'d like to write some VBA which will iterate through all emails in a certain folder, including those in any of the sub-folders. The idea is to extract the SenderEmailAddress and SenderName from every email and do something with it. I\'ve tried just exporting the folder as CSV with only these two fields and whilst this works, it doesn\'t support exporting emails held in sub-folders.