Get image attachment from outlook and automatic paste into Word document


I am new to UiPath Studio and I am currently a intern at a local company. And I need help as I need to get my task done by this week if possible. And I got task to find is there any way to get image attachment from outlook and the image can automatic insert into Word document?


Hi @phoenix123,
You can for example filter out your image attachment knowing its format extension (like “.jpg”, unless you know that you will be always receiving just the right attachments) within Save Attachments activity For each MailMessage coming from the output of Get Outlook Mail Messages. Then, within Word Application Scope, you can use “Add picture” using the path of your word file and the path to the uploaded attachment. The picture will get added at the end
of the document. In the attached workflow I have placed adding the picture inside For each file (string) in Directory.GetFiles(your folder path) in case your attachment name is unknown (so its full path will be read directly from the folder it gets saved). Does this help? :slight_smile:

1 Like

add picture in word.xaml (10.6 KB)

1 Like

@PAD yup I got it thanks for your help! :slight_smile:

No problem :slight_smile:

@PAD Thank you once again and made my day happy! :slight_smile:

:slight_smile: Additional suggestion: you can use Delete file activity to end a loop For Each file in your directory, so you will be able to reuse that directory and For Each file will bring you just the path of this one attachment you have currently uploaded.

1 Like

@PAD Ok thanks for the suggestion! :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.