keep track of the original sender

E

Edward

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 
E

Edward

Thanks Ken, I'll try that.
--
Best regards,
Edward


Ken Slovak - said:
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.
 
E

Edward

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 - said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top