Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Use VB6 or VBA to browse the object models and write sample code. Visual Basic 6 and VBA have a nearly identical set of tools for browsing objects, setting references to COM libraries, and for look-ahead help.  Most COM libraries were designed to be compatible with Visual Basic, and those will usually work well with ScriptomVBA is available as the macro language in all the Microsoft Office products, and in many other products as well.
    • Use Alternately, use Visual Studio.NET to browse the COM object model.  I don't recommend this over VB6/VBA because the support for COM is a little more obscure in the Microsoft.NET products.   However, in a pinch, it works, and the Visual Studio Express products are free.
    • Visual Basic 6 is part of Visual Studio 6, which was desupported by Microsoft in 2008.  Visual Studio 6 still works if you have it, but if you don't, you can't get it.  Microsoft has removed it and all the associated documentation from their website. 
  • Buy a book.  There are many books available that cover COM APIs for specific products.  For example, a used copy of Excel 2002 VBA on Amazon would run you less the $15, including shipping.  When you are working with the really complex applications, like Excel and Word, I have always found it beneficial to have a second opinion.
  • Use the web to find examples.  Some people call it "Programming by Google."  If you want to do something, you can bet that some other bloke has already done it and published it somewhere on the web.
  • Read the manual.  Use Microsoft's search tool at http://msdn.microsoft.com to find the official documentation.  Some of it is very good, some it will leave you with questions, but all of it is official.
  • Don't write code, write a macro.  For Microsoft Office applications that support macros, the macro language is VBA.  This means that when you create a macro, Word or Excel will actually write the code for you.  It is usually trivial to port VBA to Groovy/Scriptom.  This is an excellent way to figure out how to do obscure tasks in Office.

...