Save Word document in SharePoint library

Hi,

I’m using Aspose.Words for .Net, and trying to save a file in a library of Share point but Im getting a access denied error.

here is the code:

Dim a As New Document("c:\work\ChoveretMishtaken.docx")
a.Save("\\\harePointFolder\teams1\AgafM\Mich\pirsumim\aaa.docx")

Please! it is ergent!

Hi Naomi,

You can save document to disk and to put this file into a SharePoint document library, you don’t need Aspose.Words for .NET. Instead, Microsoft provides an API for that in Microsoft.SharePoint namespace.

You can use SPFolder.Files.Add() to add a file. An example here: https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ms412207(v=office.15) might be helpful.

Best regards,