Accessing SharePoint Lists with Visual Basic for Applications

SharePoint LogoSharePoint has many useful integration points with Microsoft Office out-of-the-box, but for truly deep integration you have to roll-up your sleeves and dig into some code. While there are multiple methods to do this, one of the most versatile is leveraging SharePoint’s many web services directly via Visual Basic for Applications. For those, like me, that lack SharePoint Designer access, this is often the only method available.

This method can be used in any application that supports VBA. This includes all the standard MS Office applications – Word, Excel and PowerPoint – but also other applications such as my favorite drawing suite, CorelDraw, or Autodesk AutoCAD. These examples were developed against SharePoint 2010 and MS Office 2010, but should also work in the 2007 and 2013 versions.

Read more of this post

Advertisements

Announcing DP_SharePoint

SharePoint LogoI’ve published the initial version of my JavaScript library, DP_SharePoint, designed to make working with client-side SharePoint development easier.  Still in development, the library provides:

  • Methods to acquire JavaScript handlers to SharePoint form controls and fields. This make it much simpler to interrogate or add event handlers to SharePoint forms.
  • Simple methods to add or remove events from SharePoint form elements.
  • Simple methods to hide and show elements of SharePoint forms.
  • Methods to simplify the calling and use of SharePoint web services and ready the data returned from them for use.

The library should be considered (very) beta but I am using it in a heavily trafficked production development.  I’ve got lots of plans for this, as I’m in a position to do a lot of SharePoint development over the next few months or years (all without access to SharePoint Designer or any back-end support).

Comments, criticisms or suggestions are always welcome!

Get List and View Indentifiers in SharePoint

SharePoint LogoThose, like me, that put in the position of managing a SharePoint Team Site without SharePoint Designer access (or indeed without the ability to install development software of any kind) are forced to get creative sometimes.  Leveraging the many rich (but annoying inscrutable) web services available offers a lot of interesting possibilities but adds significant challenges.  Most people will start with getting data from lists.

Read more of this post

I’ve GitHubbed! GitHubbled? GitHubliered?

I’ve finally gotten with the times and moved my JavaScript libraries and utilities to GitHub.  You can find me at https://github.com/kiwidust. My components are old (and, if I must admit it, old-fashioned) and I had never really considered them much beyond my own needs but since it seems a few other have found some of them useful I decided it was time become a little more formal.

The following components have been moved – feel free to fork ’em!

I’ll be maintaining the documentation here at DepressedPress.com, for now at least, and the examples will still be hosted at Comcast (as I’ve found no other viable options).  I’m open to any other suggestions to make working with my stuff easier.

Personal Archaeology: Using a GIF as a Data Pipe

Way back in the history-times, in August of the year 2000, I authored an article detailing a technique that allowed for bi-directional communication between a server and a web browser without a page refresh.  The technique was, if I do say so myself, pretty clever in a primitive, kludgy, clunky kind of way.  I have no idea if I was really the “first” to come up with this but I do know that the rise of standardized AJAX a few short years later completely and deservedly eclipsed it.

Using a GIF as a Data Pipe

What I’ve recently realized is that a lot of traffic still points to that article.  I, in fact, get nearly as many 404 errors for people looking for this article as I do legitimate hits to the site (“popular” I am not).  It’s listed in the Wikipedia article on Remote Scripting and in many blogs, forums and resource sites.  For the curious various versions of it are available on the Internet Archive.

Now it’s nothing more than a weird little historical artifact that I’ll keep here on the digital mantle for posterity.

DP_DateExtensions vs Excel: Fight!

I recently received a request for assistance with my JavaScript date extensions, DP_DateExtensions.  In part it says:

I need to simulate the MS Excel networkdays() function.  Excel would count 10th Jan 2013 midnight to 15th Jan 2013 midnight as 4 working days (6 days in total) but DP_DateExtension.js does not count the 10th so outputs 3 working days (5 total).

The Excel NetworkDays() function returns “business days” (removing Saturday and Sunday and optionally holidays from the calculation). In this case passing the function January 10th (a Thursday) to January 15 (a Tuesday) results in “4”.  This makes it clear that Excel is doing this calculation inclusively by date and obviously not from “midnight to midnight”.

Read more of this post

Friday Development Anecdote

[I was reminded of my favorite “Point-haired boss” anecdote today.  Thought some of you might be able to relate.]

It was ’97 or ’98.  Netscape 2.0 (and the first iteration of JavaScript) were only a few months old.  I had designed a (then) novel inter-page server communication technique using graphics and cookies.  For the time it was, if I do say so myself, pretty remarkable (there are still links out there claiming it as a precursor to modern AJAX).

I explained how the new financial goal planning system we developed dynamically reacted to user data during a questionnaire to both dramatically improve performance and customize presentation zones with contextual, meaningful information during an interaction.  Income bracket, number of dependents, current savings, etc – it would all feed into a dynamic, context-sensitive system that presented tailored information and products.  Initial human factors work indicated orders-of-magnitude increases in user acceptance and confidence in the system.

After a 30 minute presentation about the business opportunities the new technique presented the lead executive in the room thought long and hard, nodded and then said “Can we make it blue?