cancel
Showing results for 
Search instead for 
Did you mean: 

Embedding image in outlook email using action

VedSengupta
Level 6
Hi all,
I want to attach an image/screenshot into the body of the email sent by Ms Excel VBO . 
I have tried using <img src="PATH"> but this don't give me the desired result.

Any idea on how to achieve this!!!




Thanks and regards,
Ved Sengupta

------------------------------
Ved Sengupta
------------------------------
------------------------------ Best Regards, Ved Sengupta RPA Developer Deloitte India (Offices of the US) Bangalore | INDIA *If you find this post helpful mark it as best answer* ------------------------------
5 REPLIES 5

HarshSingla
Level 3
Hi Ved,

It will be helpful to provide inputs if you can share the error details( if any ).
I assume you are using relative 'PATH' in the src attribute of the img tag.

------------------------------
Harsh Singla
Technology Lead
CITIZENS BANK
America/New_York
------------------------------

JyothiPriya
Level 2
Hi Ved,

Please let me know if you could achieve the results?

Thanks
Priya

------------------------------
Jyothi Priya
Senior Analyst Programmer
United Utilities
Europe/London
------------------------------

Hi Priya,
I have used a code stage wherein I have written a VB Script to capture the image and store it as a ".jpeg " file.
I am sending that path as attachment in Send email action. 
After sending email I am deleting that file as the file location and name is used each time process enters that flow.

Also one more option is to use navigate stage and pass "PrtSc"--> {print screen} as Global send keys and copy it in a clipboard and paste it in a word file and store it and send it as an attachment.

Please let me know if any other optimised solution exists.


--------------------------
Best Regards,
Ved Sengupta
RPA Developer
Tata Consultancy Services
--------------------------



------------------------------
Ved Sengupta
------------------------------
------------------------------ Best Regards, Ved Sengupta RPA Developer Deloitte India (Offices of the US) Bangalore | INDIA *If you find this post helpful mark it as best answer* ------------------------------

HI Harsh,
You are correct I was using relative path as a result images were overlapping and not being saved in a correct order and hence each time the code tried replacing the same image this error was coming.

I split down my actions into the following order.
1.Check if any file exists.
           If yes, Delete.
           Else, Proceed in happy path.
   End Check.

2.Take screenshot as per dimension in VB Script.

3.Save it in pre-defined path .

4.Send this image as attachment in "Send Email action of VBO"

5.Delete the image.

6. Start from step 1 when Bot enters this flow.


--------------------------
Best Regards,
Ved Sengupta
RPA Developer
Tata Consultancy Services
--------------------------



------------------------------
Ved Sengupta
------------------------------
------------------------------ Best Regards, Ved Sengupta RPA Developer Deloitte India (Offices of the US) Bangalore | INDIA *If you find this post helpful mark it as best answer* ------------------------------

Hi Ved,

I thought your post was to embed/insert the image in the email body and not as an attachment. 
we can achieve that image source i tried it worked. 

also can you please let me know how to take a screenshot with dimension? can you share the code please?

Thanks
Priya

------------------------------
Jyothi Priya
Senior Analyst Programmer
United Utilities
Europe/London
------------------------------