• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vba Code to Export outlook emails of current date for a folder to excel

Monty

Well-Known Member
Yes Deepak..

Will check now...my last night gone cracking this...lets hope will finish today.
 

Monty

Well-Known Member
Hello Deepak.

Still trying...but no luck...Here is the screenshot for your idea from chihiro's optimized code..

After crossing 500 +...gets debug error.

upload_2017-1-19_0-42-43.png
 

Monty

Well-Known Member
Deepak....Few more points to be considered.

1) I do not want to download any format attachments...So need to remove set up from the userform.

upload_2017-1-19_1-1-8.png

2) Need date and time in a separate columns when copying the mails to excel.


Thanks in Advance!!!!!
 

Monty

Well-Known Member
Hello Deepak..

Sorry there was a particular mail in my inbox which was caussing that error..otherwise it could able to read 3000+ mails..

Error at the mail subject which is like : "==Welcome to Excel VBA=="

Deleted this mail and able to read all mails from my inbox.

Thanks.
 

Monty

Well-Known Member
Hello Deepak.

Here is the new problem with outlook emails copying to excel.

This is a different macro which i wanted to live with as it look simple.

Attached the working file.

Columns required from outlook Emails

S.no || ConversationID || Sender's Email || ReceivedDate || ReceivedTime || Size || Subject


1) When you click on button "Get Mails" able to get all mails copied to excel as per the columns expected.

2) We only have option Received time as a property...but looking for Received date and Time in a separate column need some tweak on this.

3) As of now trying to retrieve email from out look based on current date..but what really required is on ConversationID which is in "B" column... that is macro should check what was the last ConversationID and should retrieve emails on daily basis... i meen may be new Conversation IDs need to copied to excel


Finally this macro work excellent when working on my home PC as am on POP/SMTP server...Where same macro not able to retrieve and getting error at Sender's email id's as in office outlooks works on Exchange server.....Not really sure what is the problem..



Hope am not confusing...Please let me know if you have any questions..

Thanks in advance.
 

Attachments

Last edited:

Monty

Well-Known Member
Sure np..will try from end as well...but unfortunately this code works at home.a s on SMPT/pop server..not working at office being outlook on exchange server...not sure
 

Monty

Well-Known Member
Hello Deepak.

Here is the new problem with outlook emails copying to excel.

This is a different macro which i wanted to live with as it look simple.

Attached the working file.

Columns required from outlook Emails

S.no || ConversationID || Sender's Email || ReceivedDate || ReceivedTime || Size || Subject


1) When you click on button "Get Mails" able to get all mails copied to excel as per the columns expected.

2) We only have option Received time as a property...but looking for Received date and Time in a separate column need some tweak on this.

3) As of now trying to retrieve email from out look based on current date..but what really required is on ConversationID which is in "B" column... that is macro should check what was the last ConversationID and should retrieve emails on daily basis... i meen may be new Conversation IDs need to copied to excel


Finally this macro work excellent when working on my home PC as am on POP/SMTP server...Where same macro not able to retrieve and getting error at Sender's email id's as in office outlooks works on Exchange server.....Not really sure what is the problem..



Hope am not confusing...Please let me know if you have any questions..

Thanks in advance.


Still trying but no luck..eaten by 3 days sleep
 

Monty

Well-Known Member
Hello Deepak..

Thanks for responding....But home n office...Am using exce n outlook 2013 version.

Please do needful.
 

Deepak

Excel Ninja
I forget to attach for 2.

Format the column accordingly.

Code:
                'Date and time workings
                Cells(n, 4) = Int(olMail.ReceivedTime)
                Cells(n, 5) = olMail.ReceivedTime - Cells(n, 4)
                'Size
                Cells(n, 6) = olMail.Size
I don't have xl >2010 so wait till someone respond on the same.
 

Monty

Well-Known Member
Thanks Deepak....need to figure out why sender's email is not copied to excel when working at office which is outlook 2013.
 

Monty

Well-Known Member
Deepak many thanks...can we see 3rd point..

3) As of now trying to retrieve email from out look based on current date..but what really required is on ConversationID which is in "B" column... that is macro should check what was the last ConversationID in the excel and should retrieve great of the emails only on daily basis... i meen may be new Conversation IDs need to copied to excel.
 
Hello Chihiro..

Thanks for testing file for me..Some how file is not responding and not allowing to select the folder.

View attachment 37534

Still am looking for this to work...Working from my end...I really appreciate if you can help me with this.
Hi Monty

I hope you are well.

I am currently looking for exactly what you have described.

Do you have a fully working version. I am happy to pay for this if required.

It would be an enormous help.

Thanks
 
I forget to attach for 2.

Format the column accordingly.

Code:
                'Date and time workings
                Cells(n, 4) = Int(olMail.ReceivedTime)
                Cells(n, 5) = olMail.ReceivedTime - Cells(n, 4)
                'Size
                Cells(n, 6) = olMail.Size
I don't have xl >2010 so wait till someone respond on the same.
Hi Deepak

I am currently seeking this Excel VBA as indicated by Monty. Do you have a fully working version?

Kindly let me know.

Thanks
 

shree@0106

New Member
Hi All,

Thanks for the unique code.
Currently i am working on a project that download the information from outlook inbox and identify whether mail is new Or Trail mail.
There is some certain conditions:
1. If incoming mail is new then check To and CC address for validation.
a. if To and CC email address OR any DL Matches with our contact then Display the TAT of particular mail Address.
2. Check if new mail is replied or not from Sent Items. If not then set automatic timer according to TAT.
3. on that Alert msgbox gives reply option which include same mail as reply all.

Can above mentioned is possible?

Thanks
Shree
 
Top