Save attachment of outlook item

Hi Team,

I need to save pdf attachment which is there in outlook item as message…
Its like attachment in attachment.

Using save attachments , its saving only direct attachment, but not attachment in attachments



Can you please show or tell what do you mean attachment in attachment


Hi @anusha2 ,

Here are the steps you can follow:

  1. Use the “Get Outlook Mail Messages” activity to retrieve the message that contains the embedded PDF attachment.
  2. Use the “Save Attachments” activity to save the attachment to a local folder. However, since the attachment is embedded within another attachment, you need to use the IsEmbedded property to specify that you want to save the embedded attachment. Here’s an example of how you can use this activity:

mathematicaCopy code

For Each mail In mailList
    For Each attachment In mail.Attachments
        If attachment.IsEmbedded AndAlso attachment.FileName.EndsWith(".pdf") Then
            attachment.Save("C:\Users\Username\Documents\" + attachment.FileName)
        End If

In this example, we loop through each attachment in the email message and check if it is an embedded attachment and if the file extension is .pdf. If it is, then we use the Save method to save the attachment to a local folder.
3. Once the attachment is saved, you can use other activities to manipulate or process the PDF file as needed.


Hi Anil,

Thanks for your reply,


PDF is there in this attachment


Please check this…so what you need to do is after save attachments once the mail is saved…use the below code on that saved mail to extract the attachment

Hope this helps


I think this is is helpful

I will try and let you know.

Thankyou so much

Thanks Anil,

Will try and let you know .


1 Like


I need to put the code in Invoke code right


Could you please share the XAML file