Questions tagged [vba]

Visual Basic for Applications (VBA) is an event-driven, object-oriented programming language for writing macros, used for the entire Office suite as well as other applications. If your question is specifically about programming any MS Office application and Sharepoint, also use the appropriate tag for example: [excel], [microsoft-access].

59 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
99 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 ...
J C's user avatar
  • 21
1 vote
0 answers
80 views

Programmatically Moving PDFs to SharePoint 365

I have been stumped on this problem for far too long and wanted to reach out for help. I want to programmatically move PDFs from a local shared drive to a SharePoint 365 document library. I currently ...
RS1001's user avatar
  • 11
1 vote
0 answers
2k views

Retrieving local path of a file hosted on SharePoint

I am actually at the end of my rope here, I'd really appreciate any insight however small. The scenario is as follows. My company hosts the majority of its data on SharePoint. For config management, ...
bankpainmedia's user avatar
1 vote
1 answer
416 views

how can I upload a file to sharepoint using vba?

Update, I've learned that the SharedWorkSpace object has been deprecated. Anyone have another solution that doesn't use this object? I need to write a quick Excel VBA tool to send to our overseas ...
SixSigmaGuy's user avatar
1 vote
1 answer
1k views

Understanding Access's automagic authentication to SharePoint Online

I'm trying to automate SharePoint tasks from Microsoft Access using the REST API (since the CSOM is not available in VBA). This, however, requires me to authenticate. I usually authenticate to ...
Erik A's user avatar
  • 111
1 vote
1 answer
82 views

Need timestamps for the completion of each stage in a work process flow

I'm using a MS SharePoint-based Intranet site to track and report the status of a requisition as it moves through its review processes. There are six stages in the process flow and, for performance ...
Stephen's user avatar
  • 11
1 vote
0 answers
48 views

Call VBA of Word template from .NET at server side using Sharepoint Server?

Can i call a VBA macro of a Word document, using .NET and Sharepoint Server? I mean, in a .NET client environment i can do this: oW = CreateObject("Word.Application") oW.Documents.Add("template.dotm")...
nano's user avatar
  • 11
1 vote
0 answers
5k 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: ...
M.P.'s user avatar
  • 428
1 vote
0 answers
2k 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 = "...
Greta769's user avatar
1 vote
1 answer
4k 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 ...
KMLN's user avatar
  • 57
1 vote
0 answers
1k 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 ...
BjoernTheWagner's user avatar
1 vote
1 answer
198 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 ...
user63925's user avatar
1 vote
0 answers
187 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'...
user6879637's user avatar
1 vote
0 answers
50 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 ...
Tob's user avatar
  • 51
1 vote
0 answers
2k 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 ...
pheeper's user avatar
  • 143
1 vote
0 answers
1k 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://...
mBBe's user avatar
  • 1,011
1 vote
0 answers
36 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 ...
Robin Koster's user avatar
1 vote
0 answers
68 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 ...
zumalifeguard's user avatar
1 vote
0 answers
699 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 ...
Kaustav's user avatar
  • 11
1 vote
2 answers
6k 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 ...
micha's user avatar
  • 11
1 vote
1 answer
176 views

SSRS Code Behind and SharePoint

I have a couple of general questions about using VB code with SSRS reports in SharePoint. I have noticed that when I use an expression on my report, the expression only talks to the data that is in ...
lazoDev's user avatar
  • 1,806
1 vote
0 answers
551 views

SharePoint 2010 - Custom Property can't be accessed in VBA for brand new files

I have a Document Library in SharePoint 2010 which will be used to receive Excel files via email. I have created a column/property called "Status". The default value for this is "New". I email an ...
user41730's user avatar
1 vote
0 answers
168 views

Access Version History and Approval from Word Macro

Our word document templates include a table that includes a version history and a second table with the list of approvers of the document. I would like to populate these tables from a VBA macro that ...
Hurzelchen's user avatar
1 vote
0 answers
776 views

VB script to automate importing sharepoint list data to excel

I need to automate pulling data from SharePoint list data to excel through writing a VB Script (not VBA). How can I import data directly from a SharePoint List into Excel using VB script? Currently, ...
athresh's user avatar
  • 111
1 vote
0 answers
907 views

Upload file to Sharepoint from outlook attachment using VBA

I am trying to automate the process to save a file (.PDF,.docx, etc) to the Sharepoint site our team is using but a file that is coming in the form as an Attachment in an Outlook form. It is a custom ...
DonJunior's user avatar
1 vote
0 answers
420 views

Ms Access Linking To Sharepoint List

I have a SharePoint list with about 40,000 records * 4 columns I have linked the share point list in MS Access and attempted to run a query selecting all the records in the list into a local table to ...
John Smith's user avatar
0 votes
0 answers
26 views

Update enhanced rich text column on SharePoint via VBA

I am using a ADOBD Connection as shown in the code snippet below to update a SharePoint list via VBA. It does not work for the "Description" column. I believe it does not work because this ...
Schrello's user avatar
0 votes
0 answers
15 views

Filepath issue with Sharepoint in VBA

Hope everyone could help me with this. My workplace has moved everything to Sharepoint and one of the file that was created by our former Business Analyst stopped working. The part where it stops ...
Begiiner's user avatar
0 votes
0 answers
25 views

Issues saving via VBA suddenly in OneDrive/SharePoint?

I'm using this, and it has been working like a charm: https://stackoverflow.com/questions/33734706/excels-fullname-property-with-onedrive But suddenly I'm getting an issue that I can't save an email ...
Bowman's user avatar
  • 1
0 votes
1 answer
70 views

Outlook VBA Macro and custom ribbon

I have created a couple of simple VBA macros in Outlook Developer to be able to create new emails with certains templates that are saved in Sharepoint and added these macros to a customized ribbon. ...
vsvsardo's user avatar
0 votes
0 answers
154 views

Updating Sharepoint list multi-choice field with excel VBA SQL code

For a given sharepoint list, I am trying to create a row via an SQL statement. My SQL statement is as follows: sql = "INSERT INTO `My Sharepoint List` (`Title`, `Lead`, `Part`) VALUES ('Project1',...
mult-choice-mayhem's user avatar
0 votes
1 answer
1k views

How to open FileDialogue with sharepoint website folders

I want to open and browse my SharePoint folder and select a file from there like we select file from local file. But I see only the file dialogue with empty like below. My function below: Function ...
Dhay's user avatar
  • 101
0 votes
0 answers
1k views

Open excel in a SharePoint with VBA in edit mode

I want to edit an Excel stored on a SharePoint but the file can't be modified. I use this code to open the distant file and edit: Private Sub test() Dim destFolder, fs, f Dim ptrFile Set ...
Foxrider83's user avatar
0 votes
1 answer
519 views

Help with starting point for sharepoint online authenticator requests via VBA

I'm a user who maintains low-level VBA tools for myself and some colleagues. Some of the tools download or upload files from SharePoint online, treating the URLs as filepaths. I'm not familiar with ...
usernamedgreg's user avatar
0 votes
1 answer
705 views

Using ADO in VBA to query a nested List table

My List contains a "Person or Group" field, and I have figured out that this is a nested table, with fields of its own. But I am having no luck (de)referencing it. My field is named ...
Puddles's user avatar
0 votes
0 answers
612 views

Unable to map SharePoint folder or access it via an Excel macro unless SharePoint is open in Internet Explorer

I posted a similar question on Stack Overflow a while ago, but didn't get any responses so far so thought I'd try here. Basically, I'm using an Excel macro to download a few files stored in a ...
tsdn's user avatar
  • 101
0 votes
2 answers
2k views

Return last modified date/time in VBA

Been really struggling to figure out how to return the last modified date/time in VBA, a lot of posts suggest using the already existing call to FileDateTime modifying the URL to look as follows: \\...
DanHaines's user avatar
0 votes
0 answers
998 views

How to map Sharepoint 365 to network drive using VB script?

I am trying to map SharePoint Online 365 to network drive using VB script for my UFT test. Below is my test script. It used to work but the files need to be transferred to SharePoint online 365 and ...
cmlhb's user avatar
  • 1
0 votes
1 answer
8k views

VBA Autheticate to SharePoint Office 365

I tried to follow the base instructions using this post (as it was the only one I could find) http://www.sharepoint-insight.com/2016/03/21/step-by-step-sharepoint-online-authentiaction-process-via-...
Peter Evans's user avatar
0 votes
0 answers
261 views

Save Email Attachment to Sharepoint

I receive an automated report with a big .csv file. Flow is timing out for sending the email to sharepoint. Does anyone know if I can use VBA to save certain email attachments to sharepoint? Thanks.
zach's user avatar
  • 131
0 votes
2 answers
2k views

VBA Excel Retrieve SharePoint User Number By Name (not User Information List)

Below, I've got a little job to insert a record into a SharePoint list. The Requestor field is a "Person or Group" type field, and in the code, the... rst![Project] = Sheets("Sheet2").Range("B2")....
BBollmann's user avatar
0 votes
1 answer
2k views

Sharepoint Document Library Hyperlink Metadata Using Excel VBA

I have VBA code written for my Excel document. This code saves the workbook in Sharepoint site and sets the metadata for the document library that the workbook is saved into. Working code to set ...
JayM's user avatar
  • 1
0 votes
1 answer
6k 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 ...
Leroy's user avatar
  • 127
0 votes
1 answer
2k 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 ...
KMLN's user avatar
  • 57
0 votes
1 answer
66 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 ...
Jason's user avatar
  • 1
0 votes
1 answer
119 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, ...
programode0's user avatar
0 votes
2 answers
1k 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 ...
MEG_AGI's user avatar
0 votes
1 answer
117 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 ...
Luke's user avatar
  • 1
0 votes
2 answers
10k 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 ...
user6879637's user avatar
0 votes
1 answer
1k 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. ...
Tom's user avatar
  • 1