Problems with Microsoft Word Automation

by Selden 22. January 2012 12:06

I have a system that prints a bunch of documents daily.  Data is pulled from a database, and Microsoft Word performs mail merge to produce these documents.  The system runs pretty reliably, day after day processing up to 1,000 documents each day.

But last week the system started hanging up and crashing.  The log showed errors such as "the RPC server was not responding" and COM creation errors.  While the system was running, Word would sometimes pop up a message box that said it couldn't open the file normal.dot.

Since this problem had happend right after I had deployed a new build of the software, I tried reverting back to the former version.  But the problem persisted.

I searched the internet for these error messages, but none of that information really helped.

So then I tried doing a Repair installation of Word.  No help. 

So then I tried un-installing Word, and then re-installing.  Still no help.

Then one of the guys I work with decided to completely remove the entire Office package, and then re-install it.  The process actually was fairly quick, taking less than an hour to do the complete uninstall and reinstall.

And that fixed the problem!

Bottom Line: sometimes it actually can help to fully remove the software and re-install from scratch.

 

Tags:

One-Click Deployment Hitch

by Selden 29. November 2011 21:47

Recently I was setting up a one-click deployment for a customer. I had written a windows application for them, and it was getting troublesome to copy .msi files and re-install on several clients whenever I made changes to the program.

This was my first click-once deployment project, but everything went pretty smoothly until I tried the first client install. After you follow the instructions and set up the deployment folder, there is a file there publish.htm, that clients can view to do the initial program install. After that, the program is self-updating.

But the first install wouldn't work. The error message was pretty vague, and mentioned possibly the disk was full or there was something wrong with the disk.

After poking around and trying various things, I finally went through the installation error log with a fine tooth comb, and saw that it was complaining that a third-party dll that I was using already existed. So I went back to the publish property page for the project, and discovered that the dll was listed twice! I had copied the DLL into the same folder as the windows forms, and then put a reference to it in the project. Once I eliminated the DLL from the project's list of files, the deployment worked fine.

So, the moral is:

1. If the deployment fails, be sure to read the log file very carefully

2. Examine the Project Files page of the deployment, and make sure you don't have any duplicates!

Happy Programming!

 

Tags:

Welcome to my Blog

by Selden 29. November 2011 20:09

I've been in the computer programming business for more than 20 years, and have decided to add a blog to my web site.  Here I'll post articles as I get time, and share some of my programming experiences.

Enjoy!

Tags:

Blog

About the author

Something about the author

Month List

Page List