November 27, 2022, 10:33am
I want to send an email with attachments as shared from Onedrive. Every attempt failed because the UiPath Outlook send email activity, sends the attachments as copy (not as shared).
I can use VBA to send the attachments as shared as below:
Set OutApp = CreateObject("Outlook.Application")
Set OutlookItem = OutApp.CreateItemFromTemplate(*EmailTemplate*)
OutlookItem.Attachments.Add *FileFullOnlinePath*, 7
Is it possible to send as shared (code 7 in vba) via Outlook send email activity ?
Needs other activities package ?
November 27, 2022, 11:02am
You can try getting the link to the file in one drive by using office 365 activities and insert that link instead of attachment. Would this work for you?
November 28, 2022, 9:37am
Thanks for your response.
For testing purpose, i tried manually to send and email with the web location of the file as attachment.
But sent it as simple attachment, not as web location file.
November 28, 2022, 9:47am
Why don’t you send the location in body directly so that it does not attach at all and it will only be a location
November 28, 2022, 10:07am
When i share direct the link or as hyperlink in HTML body, the user doesn’t get access automatic. (like attachment)
When clicked on link, the classic access issue message displayed.
Maybe should first give access to each file
November 28, 2022, 10:10am
Yes you have to give access or you can give access to required users to a folder and place your files in the same folder always, so that they have access to it.
Or if you have required details then you can use office 365 activities to provide /share the file access
Or if you have a power automate you can write a power automate to give access to people once the file is created on sharepoint
November 28, 2022, 10:13am
I try to avoid this solution (with folder), but maybe this is the best solution.
Also, i have found a work around, i send the email via Excel VBA where i can attach the file as web location and give access to this file automatic (like the first post).
November 28, 2022, 10:14am
You can try this as well
if you have required details then you can use office 365
activities to provide /share the file access
This way you need not give access to folder also
November 28, 2022, 2:19pm
Thanks, I will try with this when i take the required info from IT.
I run it with a work around now.
December 5, 2022, 7:29am
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.