Save file as variable to use in mail activity

In my project a pdf document opens automatically because of previous activities. I would like to use that pdf as an attachment and looking for the best way to do that considering this process will run on other computers.

Any thoughts on the best way to do this?

I found a PdfDocument Variable type so I was hoping I can store the pdf as a variable and then use it as an attachment. Not sure how to do that and it might not be the best way.



Yes, declare one variable of type string and assign PDF file path to it. And then use Send Outlook MAil Message activity to attach document to that mail.


You can pass that variable into value or you can directly specify path of that PDF file here.

Thanks @lakshman. So I would have to save the pdf, then create a variable with the path to that file. How do I make sure that works consistently when running on other computers? Do I save it to the desktop and then delete it when I’m done with it?

Sorry I’m a total newby :smiley:

1 Like


Yes you can save that file any where in that machine and have to specify exact file path. If you want don’t need it further then use Delete activity and select type as ‘File’ and specify file path to delete it.

My concern is that on different machines there are different versions of adobe so the steps to save a file will be slightly different. I was hoping I can somehow store it as a variable without having to go through the steps of saving it like you would manually.

Here’s a screen shot with 2 different screens after saving the pdf in Adobe reader and Adobe Pro for instance.

Any thoughts on how to get around that?

Now with screen shot…