Help!

keep track of the original sender

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Programming VBA RSS
Next:  using COUNTIF I want to count multiple values  
Author Message
Edward
External


Since: Nov 05, 2004
Posts: 68



PostPosted: Mon Apr 27, 2009 4:01 pm    Post subject: keep track of the original sender
Archived from groups: microsoft>public>outlook>program_vba (more info?)

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
Back to top
Ken Slovak - [MVP - Outlo
External


Since: Oct 17, 2003
Posts: 3355



PostPosted: Tue Apr 28, 2009 9:33 am    Post subject: Re: keep track of the original sender [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <Edward.RemoveThis@discussions.microsoft.com> wrote in message
news:3969A06E-C2E7-476D-B84E-80F059F6B034@microsoft.com...
> 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
Back to top
Edward
External


Since: Nov 05, 2004
Posts: 68



PostPosted: Tue Apr 28, 2009 4:38 pm    Post subject: Re: keep track of the original sender [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <Edward DeleteThis @discussions.microsoft.com> wrote in message
> news:3969A06E-C2E7-476D-B84E-80F059F6B034@microsoft.com...
> > 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
>
>
Back to top
Edward
External


Since: Nov 05, 2004
Posts: 68



PostPosted: Wed Apr 29, 2009 10:55 am    Post subject: Re: keep track of the original sender [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <Edward.TakeThisOut@discussions.microsoft.com> wrote in message
> news:3969A06E-C2E7-476D-B84E-80F059F6B034@microsoft.com...
> > 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
>
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum