|
-
Jul 28th, 2010, 08:39 AM
#1
Thread Starter
Addicted Member
[RESOLVED] multiple times
Hi!
the below code is writing from outlook to excel
every day i run this macro. if i run
it will show existing sendername sent on received time adding several times in excel
Last edited by kamakshi; Jul 30th, 2010 at 10:33 PM.
-
Jul 30th, 2010, 10:34 PM
#2
Thread Starter
Addicted Member
Re: multiple times
Hi!
i have shared folders in outlook inbox which has saved inbox items as well as sent items
i am trying to extract inbox sendername and sent on and sent items - received time.
first time there is no issue. but second time run the macro from excel it adding old send itmes and inbox items into excel .
i have coding below please help this one.
thanks
Last edited by kamakshi; Aug 1st, 2010 at 07:46 AM.
-
Jul 30th, 2010, 11:16 PM
#3
Re: multiple times
wouldn't you need to check if each mail item has already been added into the excel sheet before adding it?
you could check by received time or some other property
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jul 31st, 2010, 09:32 AM
#4
Thread Starter
Addicted Member
Re: multiple times
how do i perform please let me know
-
Jul 31st, 2010, 09:44 AM
#5
Thread Starter
Addicted Member
Re: multiple times
each mail items is specific subject only i added into excel.
sendername sendtime received time
only three columns in excel
-
Jul 31st, 2010, 07:13 PM
#6
Re: multiple times
yes but each time you run the code it adds all the mailitems even if they were added before
assuming the sender and subject can be used many times the only value to check for is time /date
use excel's find method to check if the time of the current mailitem is already in the worksheet
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 1st, 2010, 07:47 AM
#7
Thread Starter
Addicted Member
Re: multiple times
Thank you Westconn,. i got it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|