![]() |
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
|
|||
|
|||
![]()
Hi, If I create a message in Outlook I can successfully use
ThisOutlookSession.Application_ItemSend event to check the subject of a sent message item (for logging). The problem is messages created in MS Access and displayed to give the user an opportunity to edit, do not trigger this event when sent (want to log message after user has made changes). Is there some way for me to ensure that this event is activated? Alternatively, in my Access routine I have the line olEmailMessage.Display True to display the message. When stepping through the code the next line is not executed until the user actually sends the displayed message. I was hoping to use the reference to the message item at this point. However, the system returns a message to say that the item has been moved or deleted. How do I maintain the reference to the message item once it has been sent? Any ideas or suggestions appreciated :-) Many thanks, Jonathan |
Ads |
#2
|
|||
|
|||
![]() You can use the same events in Access if you use the Outlook object model. Just declare the object variable WithEvents: Private WithEvents m_OutlookApp as Outlook.Application Now you can select the object's events like you would do in Outlook. If you display the email with .Display True, it gets displayed modal, i.e. the code execution is wainting until you close the window. Call it with False if you don't want it to stop. -- Best regards Michael Bauer - MVP Outlook : VBOffice Reporter for Data Analysis & Reporting : Outlook Categories? Category Manager Is Your Tool: : http://www.vboffice.net/product.html?pub=6&lang=en Am Thu, 5 Jun 2008 17:19:00 -0700 schrieb Jonathan: Hi, If I create a message in Outlook I can successfully use ThisOutlookSession.Application_ItemSend event to check the subject of a sent message item (for logging). The problem is messages created in MS Access and displayed to give the user an opportunity to edit, do not trigger this event when sent (want to log message after user has made changes). Is there some way for me to ensure that this event is activated? Alternatively, in my Access routine I have the line olEmailMessage.Display True to display the message. When stepping through the code the next line is not executed until the user actually sends the displayed message. I was hoping to use the reference to the message item at this point. However, the system returns a message to say that the item has been moved or deleted. How do I maintain the reference to the message item once it has been sent? Any ideas or suggestions appreciated :-) Many thanks, Jonathan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MSG File - Trap Explorer Selection Change Event | DG | Outlook and VBA | 8 | January 11th 10 09:03 AM |
Trap the MailItem.Reply Event | Naji | Outlook - Using Forms | 1 | April 10th 08 03:00 PM |
Outlook 2007 e-mail message headers download but not message body | DJR | Outlook - Installation | 3 | September 13th 06 03:00 AM |
Trap reply event | SuperSlueth | Outlook - Using Forms | 1 | February 13th 06 09:09 PM |
Trap Reply Event | technoloG | Add-ins for Outlook | 4 | January 18th 06 10:08 PM |