cancel
Showing results for 
Search instead for 
Did you mean: 

Get Attachments from One Drive link

Hi, 

I've been working with Outlook and reading emails with attachments. However, the Outlook VBO seems to fail when the attachment is a one drive link and not the actual Attachment. 

Through VBA and Microsoft Docs I was able to get the "Attachment" but I still can't save it.

Here's the error message: "Unable to save attachment. Cannot perform this action on this type of attachment."

The Attachment is an .xlsx file and the path is correct since I was able to save the whole Email. 

Outlook Version: 2013 (Build: 15.0.5285.1000) MSO (15.0.5275.1000) 32 bits

Has anyone had this issue, if so how did you fixed it? 

2 REPLIES 2

John__Carter
Staff
Staff
Hi Jose Luis - I think if the attachments are actually hyperlinks, then the VBO will need new logic (ie a new page) to extract them. The current logic assumes the mail will have files attached, not hyperlinks.

A quick bit of research suggests this is done via Outlook.MailItem.GetInspector.WordEditor.Hyperlinks https://docs.microsoft.com/en-us/office/vba/api/outlook.inspector.wordeditor

Hi John,

I've managed to extract the hyperlinks, however I still can't download the file as it would launch the sharepoint and open the document online. 

Since in Office 365 (for example) you can download directly the documet from the attachment, I think that there should be an option to execute the same task by code, no?