Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions related to Visual Basic for Applications (VBA)

0
votes
0answers
7 views

Open excel template file from sharepoint through link in VBA

I am trying to create a program in excel with VBA which opens a file template located inside my sharepoint. The program tries to open the file through the sharing link provided from the sharepoint and ...
0
votes
1answer
25 views

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

I want to update a metadata column for an item (document set) in a SharePoint document library using REST API (via VBA). The below (vba) code extract/simplification works fine for simple cases, for ...
0
votes
0answers
14 views

Search for a file in Sharepoint using Extra Attachmate VBA

I'm working on a project with Extra Attachmate macros (VBA script) along with mainframe. I need to fetch a value from Mainframe session and search in sharepoint (2013). I couldn't pass the value to ...
0
votes
0answers
12 views

PowerPoint slides on SharePoint are deleted while opening from Excel with VBA

I run a VBA macro from Excel that has to open PowerPoint presentations on SharePoint, read something from a slide and write it to Excel. The Makro ran on a Windows 10 VM for some weeks without any ...
0
votes
0answers
28 views

Create Document Set using VBA

I need to create Document Set in Sharepoint library, using VBA code. My current code creates Folders in library, using command MkDir, but i need to find out how to create Document Set instead. Thanks ...
0
votes
0answers
8 views

SharePoint workflow from list to create a changelog file

So i'm brand new to sharepoint and i've been assigned a task to see if its possible to create a flow so that when a list is updated/new row is added it saves those changes in an excel file or similar ...
0
votes
1answer
306 views

Unable to upload to SharePoint Online via VBA

I have tried using the below code to upload a document to SharePoint Online (Sourced from this answer) Dim SharepointAddress As String Dim LocalAddress As String Dim objNet As Object Dim FS As Object ...
1
vote
0answers
255 views

Connect/Authenticate SPO with VBA (excel)

I am trying to connect to Sharepoint Online with Excel VBA script to create or delete items in a list. The problem is how to authenticate properly to SPO. I have checked the site with instruction: ...
1
vote
0answers
196 views

VBA: Get request on a SharePoint list

I'm trying to get elements of a Sharepoint list with VBA to show and use them in an Excel sheet. The normal get request on MSXML2.ServerXMLHTTP60 Dim xmlObj as Object Dim sUrl as String sUrl = "...
0
votes
1answer
186 views

GetListItems Sharepoint Online

I'm currently trying to complete a table with information from the items of a Sharepoint Online list, using VBA code executed from Microsoft Word macro. I've successfully managed to achieve this when ...
0
votes
1answer
148 views

Getting version number into the spreadsheet

I have a spreadsheet on a spreadsheet located in a SharePoint library. Major and minor versions are enabled. I am trying to get names and values of some columns (metadata/properties) into the ...
0
votes
1answer
27 views

Document rolling back unexpectedly?

In my office we store an Excel document on SharePoint for everybody to enter data onto as the days and weeks go. I am tasked with reviewing this data and making sure it correct each month. We had some ...
0
votes
0answers
280 views

VB script to open Sharepoint file in edit mode

After weeks of trying to add charts to a Sharepoint page (with no success) I have gone down the path of using the web access excel web part. This pulls info out of Sharepoint and makes charts, and ...
1
vote
1answer
605 views

Syncing SharePoint metadata with Excel

I have a spreadsheet in a SharePoint Online library. The library has several columns of metadata, say A, B, C and D. The first two are text and next two are numbers. I would like to do two things: I ...
1
vote
0answers
378 views

Get the library name from GUID in VBA

I want to pull information from a SharePoint 2016 list in VBA. Below Code is what I found and that is working without depending on a view. Unfortunately the SQL query uses the list Name. A user could ...
1
vote
1answer
1k views

Call SharePoint web service from excel macro vba

I have called SharePoint web service from excel macro VBA with following code from here: Sub CallService() Call Add_Item("List1", "https://contoso.sharepoint.com/sites/site1/", "test item", "...
4
votes
2answers
716 views

Error in update changes from Excel to SharePoint using macro vba

I have load the SharePoint online list in excel using following VBA code from here: Sub ImportListFromSP() Dim ws As Worksheet Set ws = ThisWorkbook.Worksheets(1) Dim src(1) As Variant ...
0
votes
1answer
457 views

vba script to add items to SharePoint online list

I have a vba script which captures the user input from the outlook and updates an excel sheet. I want the vba script to write into a sharepoint list in a SharePoint online site. Please let me know how ...
0
votes
1answer
118 views

Create list items from uploaded excel spreadsheet

I am fairly new to doing anything in SharePoint, other than basic operations. I have been tasked with creating a SharePoint 2013 site with the following operations: Upload a selected Excel ...
0
votes
1answer
49 views

Is it possible to have an user-interface and macros on sharepoint?

Context I'm making a project on a company that must have an user interface and a database or work directly over an excel. Also I need this on SharePoint. Info The problem is that in the company, ...
0
votes
2answers
296 views

Excel VBA Moving SharePoint Folder

Due to SharePoint's 5000 item limit, I want to run an Excel VBA program to archive folders from a SharePoint "Active" Folder to another SharePoint Folder, called Completed. The only solution I can ...
1
vote
1answer
58 views

How to limit the length of sharepoint multiline field through vb?

I want to limit the maximum number of characters in multi-line text field of a sharepoint list programmatically in VB. I found a field UnlimitedLengthInDocumentLibrary, by making this as true it ...
0
votes
1answer
48 views

Use VBA to Relocate Folders from Old SharePoint Site to New Site

I'm currently tasked with relocation ~13,000 project folders from an old SharePoint site to our new site. Each folder will have contents, sub-folders, contents within those folders, etc. I'm sure ...
0
votes
2answers
123 views

Why is SharePoint not showing latest version of GIF?

Why is SharePoint not showing latest version of GIF? I'm using a VBA script in Excel to export and upload a diagram to SharePoint. This happens twice a day, which means I'm going to check for ...
0
votes
1answer
1k views

Excel VBA code to export chart as JPG and upload to sharepoint?

Currently I'm using the following code to export my diagram as JPG and save it in the worksheet directory. Sub exportDiagram_Click() Dim myChart As Chart Dim filePath As String Set ...
0
votes
2answers
3k views

Sharepoint properties update using Excel VBA

I am able to upload files to Sharepoint through VBA but I'm not able to update these properties to have their properties updated with 'Document Status' and 'Confidentiality' Fields. Until these are ...
1
vote
0answers
110 views

Upload documents SharePoint : Problem updating metadata

I have written a code to copy files from a folder to SharePoint using FS.CopyFile LocalAddress, SharepointAddress But when I do it manually it asks me for Document status & Confidentiality I'...
1
vote
0answers
41 views

Adding/updating column tags after populating a new document with bookmark values

Im currently running a project for a customer with the goal to automate a SharePoint environment along with word templates. So far i managed to create a word template which includes a Userform where ...
1
vote
0answers
76 views

Copy paste the value from one cell to another based on condition using VBA [closed]

Below are my steps that I need to perform in excel. and I wanted to automate this as & when I run Macro :) Background : I have already imported one sheet from another workbook and recorded the ...
0
votes
1answer
413 views

UpdateListItems Error: Data at the root level is invalid. Line 1, position 1

I´m trying the UpdateListItems web service but I always get following error in the response file: Data at the root level is invalid. Line 1, position 1. GetList, GetListItems and DeleteList works. ...
0
votes
1answer
38 views

Absolute beginner. Fell in the deep end

I have been tasked with maintaining and upgrading an infopath form that my predecessor created. I have absolutely 0 background on this particular form and he had no documentation as to where this form/...
1
vote
0answers
577 views

Authentication error when trying to map SharePoint drive through VBA

In a 2010 Excel file I have a macro that downloads an Access database file from an external 2007 SharePoint site by mapping the SharePoint folder to an open drive. I've distributed the file to other ...
0
votes
1answer
192 views

Is there a way to get an Excel doc that uses a visual basic feature to show in SharePoint?

.com/GNU92.png First image shows the blue filled in date sections in the Excel doc. This is the desired display format of the doc. Second image shows what is displayed in SharePoint. No blue date ...
2
votes
1answer
3k views

Create sharepoint document folder using VBA

I need to find a way to programmatically, using Excel VBA, create a folder in a Sharepoint Document Library. The Sharepoint Document Library already exist, and it has already one level of folders in ...
0
votes
1answer
44 views

InfoPath Conditional Arguments

I am developing a form in InfoPath to publish to Sharepoint 2010 that will have to do some calculations based on inputs. I am trying to set the value of one field based on the input from 2 option ...
0
votes
1answer
2k views

VBA code to determine whether a SharePoint file is checked out?

I've written a VBA program to examine each Excel workbook in a SharePoint folder and perhaps move it to another location. It turns out that rarely (but not never) a user is currently editing a ...
1
vote
2answers
5k views

Open File in a Sharepoint list via VBA

I want to open an excel file in a Sharepoint list via VBA. Here is my code: Sub OpenWB() Dim SummaryWB As Workbook Dim vrtSelectedItem As Variant With Application.FileDialog(msoFileDialogOpen) ....
1
vote
1answer
1k views

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

I have to fetch data from a file in SharePoint 2013 using VBA and I am mapping the SharePoint site to my network drive and accessing the file. This is working fine when I had already signed in with my ...
1
vote
0answers
397 views

Which library do I have to include to use SPListItem in VBA?

I want to read and modifiy SharePoint Lists with VBA from within Microsoft Excel 2013. Unfortunately I can not find which library I have to include to use those commands like described here: https://...
1
vote
0answers
27 views

Require SharePoint Multi-Edit Version Comments in MS Word

My SharePoint library is set up not to force checkout as we want to multi-edit documents. However, after a document is edited, we want to be able to enter a brief summary of why/what was changed. I ...
2
votes
1answer
138 views

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

I have the list item ID and I have the location of the PDF file, it is created using the excel sheet and now I want to attach it to a list item.
0
votes
1answer
50 views

NullReferenceException SPListItem

Sub lookup() Dim sptSite As SPSite = New SPSite("https://internalsite/sites/trial") Dim sptWeb As SPWeb = sptSite.OpenWeb() Dim sptList As SPList = sptWeb.Lists("TestList") Dim sptItems As ...
1
vote
0answers
40 views

How to get an Excel table's Summary property from JavaScript on the client side using the Ewa namespace

Background: The value of the Summary property corresponds to the setting of the Description box in the Alternative Text dialog box, which is displayed by right-clicking on an Excel table and then ...
1
vote
0answers
543 views

How to download and upload data from an excel spreadsheet stored on a SharePoint site into a local excel spreadsheet?

I am exploring a method to download and upload information from an excel spreadsheet stored on a SharePoint Site from a VB based form in a local excel file. Can you please assist me in understanding ...
0
votes
1answer
366 views

Visual Basic infopath print button XDocument not declared

I have an InfoPath form where I am trying to add a print button and add visual basic to print the form. What I have done so far: 1) Add a button to the form 2) in button properties click edit form ...
0
votes
1answer
168 views

Document_Open Macro Won't Start

I'm using a simple Document_Open macro to display a message box to anyone opening a Word form. This macro worked without a problem until I uploaded it as a document template in a SharePoint 2013 ...
0
votes
1answer
3k views

VBA - REST API call to Sharepoint list update speeds

I've been trying to look more into this but I can't seem to find a good explanation of why this is happening. So I am making a REST API call to a Sharepoint list. All I want is to grab information ...
1
vote
2answers
1k views

sharepoint - accessing excel files from VBA

I'm trying to access SharePoint directory from Excel VBA and loop over all files at this directory. But when I try to refer to the directory, then I get this error in return: Path not found I ...
1
vote
0answers
59 views

Link Access to a SharePoint file whose name keeps changing

I have an Access database that I would like to link to an Excel file located on SharePoint. Normally, this is easy to accomplish as SharePoint/MS Office are well integrated. The problem is, the Excel ...
0
votes
1answer
471 views

Files.Count returning 0 in SP 2013

We are using the following code to attempt to retrieve a list of files in a SP 2013 library, but Files.Count is always returning 0. The same method works in a SP 2010 environment. Are we missing ...