August 10, 2015
Here’s another tool where you can try out JavaScript, on-line: JS Fiddle. The link is to the tutorial page, in the documentation. The actual editor is here.
Microsoft provides a number of resources, besides the documentation on MSDN, for learning about the Office (2013) APIs. Read the rest of this entry »
2 Comments |
Tools, Web Add-ins, Word 2013 | Tagged: Web Add-ins, Word 2013 |
Permalink
Posted by WordMeister
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 needs to run in a host environment, typically a browser window as part of an HTML page. Of course, if you’re just playing around, setting up an HTML page so that you can see the results of your JavaScript tests is a lot of (too much!) work. What’s more, you’re not going to get much information when things go wrong – for the most part the code will simply stop executing.
So I was very happy when one book I was reading recommended using the “Firebug” add-on for the Mozilla Firefox browser.
This installs into the Firefox browser as a button in the toolbar across the top (circled in red in the screenshot, below). Clicking the button opens a split-pane at the bottom of the browser window. On the right, you type the JavaScript code. When you click on “Run” in the tools across the top of the split-pane the code is executed and the result of the last line is printed. This is similar to using the Immediate Window in the VBA Editor, except you can type lines and lines of code in a normal manner rather than everything having to be on a single line. (Firebug1.png)

Firebug add-on in Firefox
When you get serious about creating applications, such as a Web Add-in for Word or Excel, then you need a different tool – although this still comes in handy for testing things!
5 Comments |
Tools, VBA->JS | Tagged: VBA->JS |
Permalink
Posted by WordMeister