Questions related to Visual Basic for Applications (VBA)

learn more… | top users | synonyms

5
votes
3answers
24k views

Update List from Excel using VBA

I'm in the enviable position of having to support a client who wants to maintain and manipulate a complicated business spreadsheet in Excel, and then push a selection of that data to a list in ...
4
votes
2answers
8k views

Excel VBA code to upload document into SharePoint online 2013

I'm looking for a snippet in VBA to upload a document (PDF file) into SharePoint online
4
votes
3answers
955 views

Is there a way to start a SharePoint workflow from VBA code?

I created a tool in Excel VBA that generates a custom report from the data I pulled from a SharePoint list via Excel VBA code. What I want to do is change/update the "Status" field for items within ...
4
votes
2answers
4k views

Run an Excel Macros from SharePoint

I was wondering if it's possible to initiate Excel macros (Excel file is located on a network drive) from SharePoint? Are there any add-in features within SharePoint that can communicate with macros?
3
votes
3answers
34k views

Import Sharepoint List into Excel Using VBA Only

In Excel 2007, I have a VBA script that consolidates various data sources into a single Excel file for monthly archiving and reporting purposes. How can I import data directly from a Sharepoint ...
3
votes
1answer
1k views

Add New List Item With Attachment Via Excel VBA

I have users that have a schedule template in Excel (2010). I'm wondering how I can code via Excel VBA to create a new list item and attach the Excel worksheet they are using that contains the ...
2
votes
1answer
56 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.
2
votes
1answer
413 views

InfoPath - Copy values from Secondary Database Connection into Main Database connection

I was Hoping that someone could help me with the problem that I have been having, I am trying to copy one repeating field from my Secondary Database Connection into my Main Database Connection. The ...
1
vote
3answers
3k views

Can You Enhance the “Export to Spreadsheet” Action for SharePoint Lists?

Do you know of any resources/solutions to enhance the List’s “Export to Spreadsheet” function so that, once the data is opened in Excel, something would trigger VBA Macro(s) to start formatting the ...
1
vote
2answers
10k views

query a sharepoint 2010 list from excel vba to retrieve a specific record

I have created a SharePoint 2010 list with 2 relevant columns: - Identification Key - Version Number I want to be able to query this SharePoint list from Excel VBA - passing the Identification Key to ...
1
vote
2answers
3k views

Reading meta data stored in Word templates on SharePoint

I have a doc library on SharePoint for my work templates (DOTX). The doc library has a column called "Template ID". Each template has an ID stored in that column. I want to use VBA to loop through ...
1
vote
1answer
1k views

Import Sharepoint list via VBA in specific view

I am currenty trying to import a Sharepoint list in an Excel sheet via VBA and thanks to this: Import Sharepoint List into Excel Using VBA Only It is working pretty well, but if i leave the "VIEWNAME" ...
1
vote
2answers
2k views

Delete Excel file in SharePoint 2010 library only by using VBA

I am having a excel workbook. When a person click on the marco the files are saves to two new folders need to delete a Excel file on SharePoint. I have tried the "Kill" function in Excel VBA, but is ...
1
vote
0answers
81 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 ...
1
vote
0answers
62 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: http://...
1
vote
0answers
16 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 ...
1
vote
0answers
20 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
171 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 ...
1
vote
1answer
320 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
26 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 ...
1
vote
1answer
81 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 ...
1
vote
0answers
202 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 ...
1
vote
0answers
25 views

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

This question is cross-posted on SO here. I have some workbooks stored in a document library on Sharepoint 2007. I want to check out a workbook, modify it, and check it back in. Using the following ...
1
vote
0answers
99 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 ...
1
vote
0answers
194 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, ...
1
vote
0answers
356 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 ...
1
vote
1answer
6k views

Add and Update Single Item in Sharepoint List via VBA

I am trying to add and/or update single items in a SharePoint list via VBA and I found a similar question: But I have to say that I can only delete items with this code and I am not familiar with ...
1
vote
0answers
229 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 ...
1
vote
1answer
744 views

Compare Date to constant using ACE.OLEDB.12 in Excel VBA [closed]

After a lot of searching, trial and error, I finally managed to come up with an Excel VBA procedure that will return date from a SharePoint list. The query works fine if I do not qualify the Select ...
0
votes
1answer
170 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 ...
0
votes
1answer
678 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 ...
0
votes
1answer
178 views

SharePoint 2007 VBA Find Replace

I'm trying to write a VBA macro for SharePoint Designer 2007 that will find/replace text but I cannot figure out the find/replace ojbect like I've been able to do with word. Anyone know how I could ...
0
votes
1answer
2k views

Automate exporting SharePoint list 2010 items to Excel 2010

I found this Import Sharepoint List into Excel Using VBA Only that people have been successfully using to automate the exporting SharePoint 2010 list items to Excel 2010. Currently I m also using web ...
0
votes
0answers
13 views

View Version History from SharePoint using VBA

new to SharePointand at the edge of my knowledge (but not comfort zone - GIMME MORE) with VBA/Java(?) I basically want to look at a SharePoint site and dertermine the version history; This, but with ...
0
votes
0answers
18 views

Missing columns when extracting list via VBA

I'm trying to extract a list from a corporate Sharepoint using VBA, but a key column does not get extracted. When I Export to Excel from Sharepoint, the column does get extracted. But I want to be ...
0
votes
0answers
23 views

Retaining the document version with “Export to Excel” delivers a runtime error

We have been working for a kinda long time now with a vba script for retaining the document version in an exported Excel spreadsheet. It was working pretty well, however, since a few days it delivers ...
0
votes
1answer
50 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 ...
0
votes
1answer
21 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
102 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 ...
0
votes
1answer
74 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) ....
0
votes
0answers
107 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 ...
0
votes
0answers
111 views

How to use VBA to save a word document to SharePoint library with custom metadata

Thanks for taking the time to look at this. I have a template that our sales team will use. I have written some code to replace save so that the file saves back to SharePoint. The library has a ...
0
votes
1answer
23 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 ...
0
votes
0answers
23 views

Newly Added Files Cannot be Opened from VBA?

I am using the following VBA code to open a file on SharePoint. This code works just fine for any other file on SharePoint but I cannot get it to work on one specific file. I recently added this ...
0
votes
1answer
132 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
0answers
40 views

Save the modified date from sharepoint to sharepoint drive

I got this VBA Excel document where I map a network drive which is the sharepoint drive folder that I have admin rights for. The problem is that when people publish their document then the sharepoint ...
0
votes
0answers
17 views

Creating a network of files that can reference eachother

Sharepoint novice here (readas: extreme novice) Is there a way to make it so that multiple files can be dependent on eachother? IE: If there is a master list excel file with multiple sheets worth of ...
0
votes
0answers
51 views

Performance Optimization when loading Termsets

I have a problem with retrieving the terms of a termset in my program (which is written in VB). The termset has about 300 terms, and all of them have about 10 to 70 subterms. I wanted to integrate all ...
0
votes
0answers
134 views

Insert Content Type Quick Part with VBA in Microsoft Word 2013

I have a macro-enabled document I'm using with a content-types enabled from SharePoint. I know there is a way create a custom document property, but I don't think this does what I need--I need a ...
0
votes
1answer
48 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 ...