views:

586

answers:

1

Hello Everyone,

I have written an automated test which loops through a large volume of Word Documents and opens them individually in a single Word instance. My question is.. can I perform the OpenDocument() without an ApplicationClass instance?

What I would like to do is run my test without having a visible instance of Word open. Possible? It looks like it should be. The ApplicationClass has a property called "Visible" and the Document class does as well. When I switch one or the other to false I get the Null object reference exception. Has anyone done this before?

Thanks Nick...

+4  A: 

No Word instance: no, not possible

Hidden/invisible Word instance: should work, may also depend on other factors auch as version, service pack, macros installed etc.

Alternative solutions: Use a 3rd-party component which implements this functionality. Aspose has some for instance.

Lucero