I have a SharePoint list item which stores only single attachments (PPT/PDF).
I need to download this attachment on click of HTML text/ button control. I tried using Download function but it opens in web view.
Download(First(glbvar.Attachments)).AbsoluteUri
May i know how to achieve this?
Hi @Iantaylor2050, Try this
Download("https://<site URL>/_layouts/download.aspx?SourceUrl=/sites/workshop/Lists/LISTNAME/Attachments/" & ID OF THE SPLISTITEM & "/" & FILENAMEWITHEXTENSION)
<site URL>: https://domainname.sharepoint.com/sites/SiteName
-----------------------------------------------------------------------------------------------------------------------------
I hope this helps.
Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍
Thanks,
ANB
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2