![]() |
keep track of the original sender
Hi everybody,
I have written some VBA code to create a work log in Excel and when a user clicks on a button it exports the sender , date and subject of an email to an Excel file and when he finishes the job he clicks on another button and sends a new record to Excel. My code works based on the open or Highlighted email object so when an operator works on an email request and receives several new email after that in order to correctly match his worklog records he needs to go back to original email and highlight it or open it and then click the "Done" button. My question is : it is possibile to keep track of openning email ( original request) somehow that when we want to send the "Done" it can find the original email among hndreds of emails and send a new record to Excel. TO restate my question: Is there an efficent way to lets say have a userform ( keeping a list of email that an operator has opend to work on ) and then the same user can go to that list and select it and send correct info to Excel file. My other question would be: if i have a sendr name and email recived date how can I find the same email object among hundreds of emails ? I use OL2003 and exchange server 2003 -- Best regards, Edward |
keep track of the original sender
If you have a reference to an item get the EntryID property, then to
retrieve that item again later use the NameSpace.GetItemFromID() method with that persisted EntryID value. You can omit the optional StoreID property (it refers to the mailbox or PST file), or you can get it and use it. To get StoreID use something like this, where "item" is the selected item: Dim strStoreID As String strStoreID = item.Parent.StoreID item.Parent refers to the folder the item lives in and that object exposes the StoreID property. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Edward" wrote in message ... Hi everybody, I have written some VBA code to create a work log in Excel and when a user clicks on a button it exports the sender , date and subject of an email to an Excel file and when he finishes the job he clicks on another button and sends a new record to Excel. My code works based on the open or Highlighted object so when an operator works on an email request and receives several new email after that in order to correctly match his worklog records he needs to go back to original email and highlight it or open it and then click the "Done" button. My question is : it is possibile to keep track of openning email ( original request) somehow that when we want to send the "Done" it can find the original email among hndreds of emails and send a new record to Excel. TO restate my question: Is there an efficent way to lets say have a userform ( keeping a list of email that an operator has opend to work on ) and then the same user can go to that list and select it and send correct info to Excel file. My other question would be: if i have a sendr name and email recived date how can I find the same email object among hundreds of emails ? I use OL2003 and exchange server 2003 -- Best regards, Edward |
keep track of the original sender
Thanks Ken, I'll try that.
-- Best regards, Edward "Ken Slovak - [MVP - Outlook]" wrote: If you have a reference to an item get the EntryID property, then to retrieve that item again later use the NameSpace.GetItemFromID() method with that persisted EntryID value. You can omit the optional StoreID property (it refers to the mailbox or PST file), or you can get it and use it. To get StoreID use something like this, where "item" is the selected item: Dim strStoreID As String strStoreID = item.Parent.StoreID item.Parent refers to the folder the item lives in and that object exposes the StoreID property. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Edward" wrote in message ... Hi everybody, I have written some VBA code to create a work log in Excel and when a user clicks on a button it exports the sender , date and subject of an email to an Excel file and when he finishes the job he clicks on another button and sends a new record to Excel. My code works based on the open or Highlighted object so when an operator works on an email request and receives several new email after that in order to correctly match his worklog records he needs to go back to original email and highlight it or open it and then click the "Done" button. My question is : it is possibile to keep track of openning email ( original request) somehow that when we want to send the "Done" it can find the original email among hndreds of emails and send a new record to Excel. TO restate my question: Is there an efficent way to lets say have a userform ( keeping a list of email that an operator has opend to work on ) and then the same user can go to that list and select it and send correct info to Excel file. My other question would be: if i have a sendr name and email recived date how can I find the same email object among hundreds of emails ? I use OL2003 and exchange server 2003 -- Best regards, Edward |
keep track of the original sender
Ken,
I'm not an expert in outlook programming , so sorry if i'm asking a trivial question, I got the EntryID and I keep its value in a modul level string variable to use it in other procedures later. the problem i have I can only retrieve it's value once like msgbox myNameSPace.GetItemFromID(myID).SenderName after this code runs and displays the correct data somehow myID variable which holds the vaure of the EntryId gets cleared and it's value becomes empty "" so the next time when I run the same code I get an error. I don't know why this variable dosn't keep the value? any thoughts? -- Best regards, Edward "Ken Slovak - [MVP - Outlook]" wrote: If you have a reference to an item get the EntryID property, then to retrieve that item again later use the NameSpace.GetItemFromID() method with that persisted EntryID value. You can omit the optional StoreID property (it refers to the mailbox or PST file), or you can get it and use it. To get StoreID use something like this, where "item" is the selected item: Dim strStoreID As String strStoreID = item.Parent.StoreID item.Parent refers to the folder the item lives in and that object exposes the StoreID property. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Edward" wrote in message ... Hi everybody, I have written some VBA code to create a work log in Excel and when a user clicks on a button it exports the sender , date and subject of an email to an Excel file and when he finishes the job he clicks on another button and sends a new record to Excel. My code works based on the open or Highlighted object so when an operator works on an email request and receives several new email after that in order to correctly match his worklog records he needs to go back to original email and highlight it or open it and then click the "Done" button. My question is : it is possibile to keep track of openning email ( original request) somehow that when we want to send the "Done" it can find the original email among hndreds of emails and send a new record to Excel. TO restate my question: Is there an efficent way to lets say have a userform ( keeping a list of email that an operator has opend to work on ) and then the same user can go to that list and select it and send correct info to Excel file. My other question would be: if i have a sendr name and email recived date how can I find the same email object among hundreds of emails ? I use OL2003 and exchange server 2003 -- Best regards, Edward |
All times are GMT +1. The time now is 05:13 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-2006 OutlookBanter.com