Office Automation

Someone asked if anyone automates Office applications any more. That struck me as kind of funny. If I had to guess, I would guess that there are more lines of VBA code (poorly written or not) that automate Office applications than all the COBOL, VB6, PHP, and any other language you can think of doing anything. I don’t have any evidence of that. It’s in the Outlook-is-the-largest-data-store vein. Because there are so many Excel, Word, Access, etc documents out there, I think all the code in them would add up to a bunch. What do you think?

There are more lines of VBA code automating Office apps than all other kinds of code doing all other tasks
Can’t/Won’t Guess

Free polls from

Posted in Uncategorized

10 thoughts on “Office Automation

  1. “You did not select an answer. If you wish to vote in this poll, please select an answer and try again.”

    I did so select an answer.

  2. Same as Jon,

    I would say true, but that is only if we double count unique lines, I am sure that there is so much copy and paste going on….
    And definitely not if you exclude all the recorded macro.

  3. For the record I would have voted for “can’t/won’t”.

    I’m pretty sure there are more lines of code not written by humans in Office VBA than anywhere else. The Excel macro recorder is probably the most prolific programmer in history.

  4. It probably all depends on how the counting is done. If I write an add-in that 1,000 people use, do we count each line of code once, or 1,000 times? Similarly, if 100,000 people use a web site that depends on Java applets or client-side JavaScript or VBScript, is that counted once or 100,000 times?

    Even so, I think Jon’s basic point is valid: there is an unbelievably massive amount of VBA code out there, including stuff that even large companies depend upon to a staggering degree to get their work done and keep the lights on.

  5. Apologies, should have written “Even so, I think Dick’s basic point is valid…”

  6. What is missing in the equation is that office keeps coming out with newer versions (Office 1968 to Office 2010). Some of these upgrades (or downgrades depending on viewpoint) have forced “re-coding” or significant changes in the way automation occurs. Additionally, the role of ODBC / Internet data scraping has significantly impacted office automation.

    I would answer in the affirmative that more VBA code (including regular macros) exist than cobol code.

    Does anyone know when Cobol 2011 is coming out?


  7. No. Add all the code in huge legacy applications (banking etc.), long-forgotten platforms with all their OS and application code, embedded systems running everything from traffic lights to toasters to space stations, all the open & closed source development across myriad platforms and I think you would have far more LOC than all the VBA that has ever existed. For all the millions of Office licenses, very few ever do more than dabble with the macro recorder, and fewer still take it to the application development level that will generate 1,000s of LOC.

    Factor in alderaic’s point about duplication and the VBA LOC total would probably reduce by a factor of about 10.

  8. I don’t know if the amount of VBA code is larger than the amount of code written in other programming languages. But its certainly the #1 ‘user’ programming platform in the world.

Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.