It took me a while to decide if I wanted to blog about this, but I decided that it is something that can make a developer's life a lot easier. There is a workaround to the whole Office 2007 activation wizard. Normally, you have (depending on your version) a certain amount of days or usages of Office before you have to activate it. Although this helps protect against software piracy, I've found it to be annoying when I'm developing against Office.
Also, since we use a lot of VMs, and rebuild our development machines frequently, we quickly blast though our MSDN volume license subscription's maximum allowable number of installations. This is a problem because we write a lot of applications that use or automate Office, and the number of installations that we register always ends up exceeding the actual number that we're using.
The workaround is simple: if you invoke Excel, Word, or any other Office app though its object model, the activation wizard is circumvented, and one of your pre-activation usages is not burnt. This is great for development, because we can activate Office on our main machines and not worry about wasting a license on a dev machine or VM that we are going to throw away regardless.
Here's the code outlining how to do this for Excel:
Here is the code:
And there you have it. Run your code, and you will have Excel running normally. This will not count as a pre-activation usage.
Please do not exploit this. I pass this information on a way for developers to be more productive, not to shamelessly steal Office.