Archive for July, 2009

Simple VBScript Progress Bar

July 16th, 2009

Recently I had a need for a simple progress bar written in VBScript to let users know what was going on in a multi-step application. To my surprise, VBScript has nothing built in for a progress bar.  After much searching, I was able to find this thread that linked to yet another thread with a simple progress bar done in HTML using InternetExplorer.Application.  I have taken this code and modified it to show an actual progess bar, with percentages, that can be updated as desired.  I’ve wrapped it up in a nice easy-to-use class for reusability.  Enjoy!

» More: Simple VBScript Progress Bar

Access Microsoft Excel 2007 COM API through Microsoft Active Accessibility

July 15th, 2009

A couple days ago I showed you how to access the Microsoft Word 2007 COM API through Microsoft Active Accessibility (MSAA). Today, I’m going to switch it up just a little bit, and use the same method to access the Microsoft Excel 2007 COM API. Again, we’ll be using AccesssibleObjectFromWindow to get at the main Excel::Window object. From that object, you can obtain the Excel Application, and Excel Workbook objects. Some documentation from Microsoft can be found here.

» More: Access Microsoft Excel 2007 COM API through Microsoft Active Accessibility

Getting the COM object from HWND using AccessibleObjectFromWindow in Microsoft Word 2007

July 14th, 2009

After spending some time on this over the past few days, and sorting through the spotty documentation provided by Microsoft on Accessibility, I was able to get a handle on the COM object in Microsoft Word 2007.  It turns out to be pretty simple, and is actually in the documentation they provide here, but they don’t make it clear as day.  I intend to do that here.

» More: Getting the COM object from HWND using AccessibleObjectFromWindow in Microsoft Word 2007