Web Add-ins: Developer IDE

July 31, 2015

As you’ve seen from the discussions about JavaScript and creating the “Hello World” Web Add-in sample, working with non-proprietary programming languages, such as JavaScript, does have at least one advantage: You’re not locked into any particular software to write your code. In order to create VBA code you need the VBA editor, running in an […]


Web Add-ins: Analyzing the “Hello World” JavaScript

July 30, 2015

I hope you’re not feeling too intimidated and have been able to create and load the “Hello World” sample… This post takes a closer look at the JavaScript part of the sample. The discussion is in two parts: First, how JavaScript is linked into the HTML page; then, the JavaScript code with the main focus […]


Web Add-in: XML Manifest & security

July 29, 2015

As became apparent in the previous post introducing Web Add-ins, a Web Add-in consists of more than a single file containing the code. Distributing and installing a Web Add-in is more complex than handing someone an Office document containing the code and explaining how to change the settings in the Trust Center so that it […]


Bug Word 2013: COM exception comparing documents

July 29, 2015

I’m breaking the rhythm of the series on Web Add-ins to report a bug that was discovered by a developer in the VSTO forum, this week.


Web Add-ins for (Word) VBA developers – Introduction

July 28, 2015

My discussion of Web Add-ins will center on Word, since that’s “where I live”. The information on the basics is certainly relevant to other Office applications (Excel and PowerPoint) if the Web Add-in is hosted in a Task Pane – the only kind of Web Add-in Word supports. So, what all is involved in creating […]


VBA->JS: More about objects (Syntax & Concept)

July 27, 2015

So, if JavaScript is so mutable, how can the developer be sure what an object actually has in the way of properties and methods? The language provides some properties that return useful information about an object.


VBA->JS: Scope, objects and keeping control (Syntax & Concept)

July 26, 2015

The previous post introduced Objects in JavaScript and showed two ways to declare and populate them. This entry provides more information about what can happen to objects that a VBA developer wouldn’t expect, as well as touch on the topic of variable scope. The reason for covering both in one place is the concern for […]


VBA->JS: Object basics and unnamed functions (Syntax & Concept)

July 24, 2015

Objects as a data type were introduced in a previous post. Now it’s time to look at them in more detail.


VBA->JS: Named functions (Syntax & Concept)

July 23, 2015

Now that you have an idea of the basic JavaScript syntax it’s time to expand from code snippets to more complex subjects, starting with functions. This topic will extend over a number of posts as it’s not quite as simple as what we know from VBA…


VBA->JS: Conditionals, Loops & Operators 4 (Syntax)

July 21, 2015

In this last post on conditionals and loops I’ll present Arrays and how to loop using the last kind not yet discussed: “For Each”.


VBA->JS: Conditionals, Loops & Operators 3 (Syntax)

July 20, 2015

In the third part of working with conditionals we’re going to look at some looping operations. Again, the concept is the same as what’s used in VBA, just different syntax.


VBA->JS: Conditionals, Loops & Operators 2 (Syntax)

July 19, 2015

Now that you’ve familiarized yourself with the logical operators JavaScript uses it’s time to look at the basic conditional constructs. Looping constructs are the topic of the next post.


VBA->JS: Conditionals, Loops & Operators 1 (Syntax)

July 19, 2015

An important part of most programs we write is testing the values of variables and performing tasks based on the result. Typical VBA constructs that use comparisons are If, For, ForEach and Do…While. JavaScript provides the same functionality, using pretty much the same logic, but the syntax differs. Before we look at these in the […]


VBA->JS: Data type properties and methods (Concept)

July 18, 2015

VBA provides useful functions for working with variables of the data types String, Number and (to a lesser extent) Boolean. For example, if you need information from a String you can use Len(), Left(), Mid() and Right() to determine the number of characters in the string, the characters counting from the beginning of the String, […]


VBA->JS: JavaScript data types (Concept)

July 18, 2015

Data types determine what can be done with the content in a variable. For example, Numbers can be manipulated arithmetically; Boolean is used to test a variable’s state: does it or does it not meet a specified criterium. Two of the data types used in VBA are also found in JavaScript and are used in […]


VBA-JS: Kodiak JavaScript (Tool)

July 17, 2015

Due to an injury to my horse, I’m spending a lot of time at the stable. It’s much more economic to sit there for a couple of hours rather than drive back-and-forth. To make the most of my time, I try to do some work – learning more about JavaScript – while I’m there. Since […]


VBA->JS: Trying out JavaScript (Tool)

July 17, 2015

Up until now, you’ve had to take my word that JavaScript behaves the way I describe. That’s fine, for an article or two, but at some point a developer wants to actually try these things out… Unlike VB6, VB.NET or C# you can’t create an independent program using JavaScript, by itself. Similarly to VBA it […]


VBA->JS: Case sensitivity (Syntax)

July 17, 2015

When working in VBA it doesn’t matter, for the most part, whether you type capital or small letters. VBA will monitor and compare with its internal list of keywords as well as variables you’ve declared and make corrections as you go. If there are variables that aren’t declared there are no automatic corrections, but VBA […]


VBA->JS: String concatenation (Syntax)

July 16, 2015

The VB languages differentiate between concatenating (“adding”) strings and adding numbers. You’re supposed to use an ampersand (&) to concatenate a string and a plus sign (+) to add numbers. Although VBA will accept a plus sign to concatenate strings it’s frowned on as you can get unexpected results. JavaScript (like C#) must use the […]


VBA->JS: Comments (Syntax)

July 16, 2015

Commenting code is important. JavaScript and C# use the same commenting conventions, which differ somewhat from VBA’s. Comments can be on a single line, similar to VBA; they can also extend across multiple lines:


VBA->JS: Variable declaration & semicolons (Syntax)

July 15, 2015

In both VBA and JavaScript, as with most programming languages, those things with which code works are held in “variables”. Both VBA and JavaScript declare variables and assign values to them. Comparing how they do it:


JavaScript for VBA Developers – a short history

July 15, 2015

Those of us who’ve been developing with the Office applications for Windows since they were introduced in the early 1990’s are no strangers to programming language changes. The transition in version 97 from the UI-oriented WordBasic / Excel XLM / AccessBasic languages to the more object-oriented VBA meant not only learning a new language, but […]