Hot answers tagged

3 votes
Accepted

SharePoint API and VBA - Access Denied

I've found the solution for my question... so I hope this helps someone. Answering my own question, yes we need to send a Token to be able to use the API. The approach to get this token is to retrieve ...
Jefferson Gomes's user avatar
2 votes
Accepted

Call SharePoint web service from excel macro vba

There is single quote ' missing in strBatchXml Name field: Replace <Field Name=" + FieldNameVar + "> To <Field Name='" + FieldNameVar + "'>
Chandresh's user avatar
  • 499
2 votes

From Excel 2010 is it possible to attach a PDF file to a list item.

Try working with this code snippet. This assumes you have an SPWeb and SPList open: var item = list.GetItemById("your_item_ID"); var file = web.GetFile("URL_of_your_file"); var bin = file.OpenBinary()...
Paul Strupeikis's user avatar
1 vote
Accepted

VBA\C#.How to automatically map MS Project fields to a list on a SharePoint site

Use the Text# fields in Microsoft Project to store custom data. Here is an example that maps "Description" from SharePoint to the "Text5" field in Microsoft Project. Sub MapFields()...
Martin Iszac's user avatar
1 vote

How to access Enterprise Task Custom field in macro?

So you're trying to add values to the lookup choices for a field? Not set a task field value e.g. a task "text" custom field. The problem is that you cannot modify an Enterprise Lookup Table in the ...
Martin Laukkanen's user avatar
1 vote
Accepted

SP Online REST API Change the Content Type of a Document Library Item

As mentioned in comments, it needs to be ContentTypeId and not ContentTypeID where Id is in lowercase. So modify your line of code as below: szBody = "{ " & mconSzQt & "__metadata" & ...
Gautam Sheth's user avatar
  • 30.8k
1 vote

SharePoint REST API - update metadata Document Library Item when value string includes apostrophe (single quote) character

Various research led me to try 'escaping' the apostrophe in various ways, however if it updated the column's value field at all, then the entire 'escape sequence' found its way into the column's ...
Vadim Gremyachev's user avatar
1 vote
Accepted

GetListItems Sharepoint Online

You're right regarding to authentication issue. SharePoint Online uses the O365 authentication system. Available options explained here with sample. As advice, modify your macro to use the rest API ...
Vladimir Herrlein's user avatar
1 vote

Workbook.CheckIn always produces an error the first time it's called? (x-posted on StackOverflow)

This post is 7 years old, and I still see a lot of people struggling with this error ("Method 'CheckIn' of object '_Workbook' failed"). I finally found a solution that worked for me. Instead ...
Paulo Giolo's user avatar
1 vote

Add New List Item With Attachment Via Excel VBA

I know it isn't super pretty, but I have a solution... Make sure that you replace YOURSHAREPOINTSITE with the url of your site. The beauty of my solution, is that the code allows for: Creation of ...
Malone Dunlavy's user avatar
1 vote

Add and Update Single Item in Sharepoint List via VBA

just to build upon the above answer (which is great, thank you!) and to account for jdgregson's correction. Please see the below code, there are some comments in there which will show you how to ...
FrisbieLife's user avatar
1 vote

Import Sharepoint list via VBA in specific view

I know this is an old entry, but as I've been looking for solutions four years later, someone else may benefit from this information. Public Function spEdit(wb As Workbook) Dim xlapp As ...
RLee's user avatar
  • 11
1 vote

Error in update changes from Excel to SharePoint using macro vba

well as you clearly indicated on your comment that its the error generated from objListObj.UpdateChanges. Its clearly stated that: This method applies only to lists linked to a SharePoint site. If ...
Ali Jafer's user avatar
  • 17.8k
1 vote

vba script to add items to SharePoint online list

You can try this example https://stackoverflow.com/questions/37434198/add-items-in-sharepoint-office-365-list-using-vba-giving-error-access-denied But here you make sure the excel account should have ...
Suresh Bolineni's user avatar
1 vote

Create list items from uploaded excel spreadsheet

SharePoint lets you import an Excel file when creating a list. Each row of your Excel file will become a row in your SharePoint list, as shown below: Full procedure is described on Microsoft web site ...
Antoine Driard's user avatar
1 vote
Accepted

Why is SharePoint not showing latest version of GIF?

Seems to be Cache issue from TMG, can try verifying this by adding a query string parameter to your GIF url. For e.g https://www.contoso.com/sites/me/photo.gif?rev=1.0
Kushal Bhabra's user avatar
1 vote

Why is SharePoint not showing latest version of GIF?

Restart the timer job of the server. It surely a Cache issue and nothing else. Try the below link for clearing the SharePoint cache: http://www.jeremytaylor.net/2013/10/12/clear-sharepoint-cache/
Ankit Kumar's user avatar
  • 1,768
1 vote

Create sharepoint document folder using VBA

Dim strDate As String Dim strTime As String strDate = Date strTime = Time strDate = Format(Now(), "mmmdd yyyy hh mm") Dim strURL As String ''Copy and paste the URL of ...
Vanidasan's user avatar
1 vote

Open File in a Sharepoint list via VBA

You can open a SharePoint file directly using VBA without having to save it to a temp folder. I use this code to open Email Templates with VBA that are stored on SharePoint, but you can modify it to ...
furstukin's user avatar
1 vote

Open File in a Sharepoint list via VBA

From my experience you are not able to directly open a file on SharePoint like that. You need to download the file first and then open it. I store the file in the user's temp folder via the code ...
pheeper's user avatar
  • 143
1 vote

How to authenticate and log on to SharePoint 2013 using excel vba

Depending on the setup, you can try creating a dummy excel file and uploading it to a SharePoint folder. If you are not authenticate it will either open a browser for you to enter your credentials or ...
pheeper's user avatar
  • 143

Only top scored, non community-wiki answers of a minimum length are eligible