views:

719

answers:

1

Hello

I have written a DLL that uses MS Word to spell check the content of a RichtextBox. The project uses Microsoft Word 11.0 Object Library. I have read that you can use that reference on machines using that version of Word or later, and that seem to be true.

However ... When I run the dll in a test app on a machine with Windows Vista and Word 2007 then it runs very slow. Does the Word Object Library for the 2007 version differ in any way that makes it really slow during automation? Or is it some kind of re-interpetation at runtime that makes it behave like this?

Should I make different version of the dll, One for machines with Word 2003 and one for machines with Word 2007? That would really make the whole point of making a spell checking dll for use in many different project kind of pointless.

+1  A: 

You should approach this like any other engineering problem: 1. Profile the code to see if it's your fault or not 2a. If it's your fault, correct as needed 2b. If it's that particular .dll, define your spell checking object as an interface or an abstract class and at runtime, use a concrete instance of that interface that is most appropriate for the environment in which you're running.

plinth