Questions related to Visual Basic for Applications (VBA)

learn more… | top users | synonyms

0
votes
1answer
1k views

VBA - copy folder - checkout required

I'm using an access database to generate a folder full of files. I want to copy the folder to sharepoint. I'm trying to do this by programmatically mapping the sharepoint library to a network drive, ...
0
votes
1answer
37 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 ...
1
vote
0answers
28 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
17 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 ...
5
votes
3answers
23k 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 ...
0
votes
1answer
36 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
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 ...
0
votes
1answer
53 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
1answer
283 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 ...
0
votes
0answers
62 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
1answer
44 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
0answers
49 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 ...
4
votes
2answers
7k 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
1
vote
0answers
48 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: ...
1
vote
0answers
15 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
51 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.
3
votes
3answers
33k 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 ...
0
votes
1answer
22 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
21 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 ...
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 ...
0
votes
0answers
124 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
97 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 ...
4
votes
3answers
887 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 ...
0
votes
0answers
39 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
16 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 ...
1
vote
2answers
9k 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
1answer
936 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" ...
0
votes
0answers
46 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
85 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 ...
1
vote
1answer
74 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 ...
0
votes
1answer
525 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
0answers
62 views

Run VBA macro after synchronizing with the Sharepoint

I have a MS Project file synchronized with the list on the Sharepoint. I want to run a VBA macro just after synchronization is done (after I click File -> Save As -> Sync with SharePoint). How to do ...
0
votes
0answers
293 views

Filter XML results from REST API call to SP list data

I was curious if it was possible to use VBA to send a query inside a REST API call to a sharepoint (SP) site in order to extract data from the SP list? I've looked around and I can't find an exact ...
1
vote
0answers
23 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
141 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 ...
1
vote
0answers
183 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
24 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 ...
3
votes
1answer
962 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 ...
0
votes
1answer
125 views

Export Access table to SP with display control Combo box

I have table in MS Access, that has following lookup properties: Display control: Combobox Row source type: Value list Row source: "Option 1";"Option 2";"Option 3" And I want export this table to ...
1
vote
0answers
87 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
172 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, ...
0
votes
1answer
40 views

Advise on how to share excel with other users

I am looking for advice on how to resolve the following issue. As part of a volunteering project I have automated an Excel spreadsheet using VBA. I have written a lot of code that includes user forms ...
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?
1
vote
0answers
341 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 ...
0
votes
1answer
127 views

Pulling Reports from SharePoint 2007 using VBA on a Recurring Event

Is there any code that will pull in all items listed on a recurring event that has a future start date? We have created a Calendar List for each of our clients with recurring tasks that the payroll ...
1
vote
0answers
225 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
697 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 ...
2
votes
1answer
406 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 ...
0
votes
1answer
429 views

Uploading a document to a SP 2010 server via VB6

I'm currently trying to upload a file to a SharePoint 2010 server from within a VB6 application. Unfortunately I can't use any .NET or other additional libraries. I've read a couple of suggestions ...
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 ...