![]() |
Generate email, let user alter, find email again and save ...
I am developing a program that should do the following:
1. Generate an email with subject, sender and body. 2. Send the email to Outlook and let the user alter whatever he/she wishes. 3. The tricky part – when the user presses send my program should grab the altered email and save in on the disk. The first two steps I have figured out, but the last step gives me trouble! I thought I could use the EntryID but somehow Outlook changes the EntryID when the email is send? How do I find the email again? Is there perhaps a variable on the email item I can assign a unique ID of my own? Hope someone can help me out – a Delphi example would be GOLD - but I think I can convert VBA code to Delphi if not :) Thanks in advance. - Rune |
Generate email, let user alter, find email again and save ...
You can trap the Send event on the opened item if it is opened using an
event handler for ActiveInspector.CurrentItem.Send. You can trap the ItemAdd event on the Items collection of the Sent Items folder. See http://www.outlookcode.com/d/code/zaphtml.htm#cw for a VBA/VB example of an ItemAdd handler for the Inbox. You can add a user property (Item.UserProperties.Add). -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Rune Mathiassen" wrote in message ... I am developing a program that should do the following: 1. Generate an email with subject, sender and body. 2. Send the email to Outlook and let the user alter whatever he/she wishes. 3. The tricky part – when the user presses send my program should grab the altered email and save in on the disk. The first two steps I have figured out, but the last step gives me trouble! I thought I could use the EntryID but somehow Outlook changes the EntryID when the email is send? How do I find the email again? Is there perhaps a variable on the email item I can assign a unique ID of my own? Hope someone can help me out – a Delphi example would be GOLD - but I think I can convert VBA code to Delphi if not :) Thanks in advance. - Rune |
Generate email, let user alter, find email again and save ...
Or you can use the Application.ItemSend event if you don't need the sender
related properties. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Ken Slovak - [MVP - Outlook]" wrote in message ... You can trap the Send event on the opened item if it is opened using an event handler for ActiveInspector.CurrentItem.Send. You can trap the ItemAdd event on the Items collection of the Sent Items folder. See http://www.outlookcode.com/d/code/zaphtml.htm#cw for a VBA/VB example of an ItemAdd handler for the Inbox. You can add a user property (Item.UserProperties.Add). -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Rune Mathiassen" wrote in message ... I am developing a program that should do the following: 1. Generate an email with subject, sender and body. 2. Send the email to Outlook and let the user alter whatever he/she wishes. 3. The tricky part - when the user presses send my program should grab the altered email and save in on the disk. The first two steps I have figured out, but the last step gives me trouble! I thought I could use the EntryID but somehow Outlook changes the EntryID when the email is send? How do I find the email again? Is there perhaps a variable on the email item I can assign a unique ID of my own? Hope someone can help me out - a Delphi example would be GOLD - but I think I can convert VBA code to Delphi if not :) Thanks in advance. - Rune |
All times are GMT +1. The time now is 11:30 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com