Hi
Through below ,i can able to save entire e-mail …But i want Excel spread sheet (.xlsx) also saves in that path …it is not happening ?
Hi
Through below ,i can able to save entire e-mail …But i want Excel spread sheet (.xlsx) also saves in that path …it is not happening ?
the attachments OUTPUT name is “attach” (varaible)
But it is not saving the Excel file in the path …?
yah it would actually as what you have mentioned is correct
–Your folderpath is correct
–your message property is mentioned with item and i hope the item variable is obtained from the for each loop activity with type argument mentioned as system.net.mail.mailmessage in the property panel of for each activity
–to check whether the file exists or not use a PATH EXISTS actiivty next to this save attachment and mention the file path in the path exists activity which will give us a boolean variable
–we can pass this to a if condition and check if its there it will go to THEN part and use a log message activity with string “exists” or goes to ELSE part with log message activtiy “doesn’t exist”
Cheers @allurai_india
Yes “item” Argument is system.net.mail.mailmessage…but it is not saving my Excel files…
No hope …
@allurai_india First check if your mail object has any attachments , if yes in the save attachment activity you just have to pass the mail object and the path where you want to save, if you have multiple attachments you can iterate over to do some operations, if you have a problem with path try saving it in any other folder, you will know the reason why it is not saving. Debugging!
& you can’t print an IEnum directly through message box it is like a list u can print the object of a list.
This is strange
but no worries
last and final check is whether we have attachment or not
i hope we dont have any such attachments with the mail
cheers @allurai_india
these are screen shots of my entire …task …
btw …
while saving the e-mail …i change the file name …(although it is saving good …it should not be linked to ATTACHMENTS ??)
Fine
place the save attachment before to save mail message activity and try once
Cheers @allurai_india
thanks …it is working now …
I forgot to select option "get attachments "…in GET EXCHANGE E-MAIL " …now it is okay .
But i have other problem …i would like to attach the same Excel in e-mail …
Fantastic
get the cursor to the blue exclamatory symbol here and share that screenshot buddy
Cheers @allurai_india
@allurai_india how do you know if your attachment is of .xlsx before saving it to a folder, pass the excel full path in the in argument and cmg to the error it is a collection of strings cant join them together.
Fine the reason is attach is the output that we get from save attachment which is of type ienumerable which cant be used along with the string
–so use a assign activitiy before to the save attachment and mention lke this
attachmentName = CType(item.Attachments.FirstOrDefault, Attachment)
where attachmentName is a string variable and use that here in the attachfile property instead of variable attach
you were almost done
Cheers @allurai_india
i found another way as well…i mention “attach” varaible in attachments collections …
it is working …now …thanks for helping all the way …
yes …you are correct …i fixed it now …thanks