How to read outlook mail subject and save in excel

Hi,

How to read outlook mail subject and save in excel.

@neerajmca5,

Corrected Solution : How to get outlook email subject into string variable

Reference : Lesson 11 practice 1

Regards,
Dominic :slight_smile:

How to save( All Mail subject) of outlook in excel

@neerajmca5, hope it has been answered here,

How to get outlook email subject into string variable

Regards,
Dominic :slight_smile:

Hi @neerajmca5,

Use Get Outlook Mail Message activity to get the all the mails
Properties Top-> “-1” to get all the mail messages.
if you want only unread mail messages check the OnlyUnReadMessages
create datatable using Build datatable ->Column as “Subject”
then using for each activity loop through the mail.

strSubject=item.Subject.Tostring
using add data row activity add the subject value.(strSubject)

after loop finish use Write range activity to write the Subject in the excel file.
For Reference

Regards,
Arivu

1 Like

Hi @neerajmca5,

I have the same workflow as you have mentioned i got “From, Subject, Date” in a variable & i got the data(reflects in message box). After adding those 3 variable in Input ArrowRow of “Add Data row” activity & running the workflow i am facing the below mentioned exception.

Source: Add data row
Message: Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value (not initialized).
Exception Type: NullReferenceException

Please share some light on the above scenario OR if you have similar workflow can you share it

Regards,
Suhas

Hi @Dominic
I am trying to store the subject name into excel, but its giving me error.
"string can not be converted into datatable"like that.
so I am unable to store it into excel can you pls help??

Hi @arivu96
I am trying to store the subject name into excel, but its giving me error.
"string can not be converted into datatable"like that.
so I am unable to store it into excel can you pls help??