calling word from .net

  • Thread starter Thread starter sudha
  • Start date Start date
S

sudha

Hi
I want to automate word from c# program and i used the
sample solution from MSDN to see how it works
..
I have .NET 2003 / office 2000
the sample solution comes with a WORD.DLL

When i executed, i got a run time error :
An unhandled exception of
type 'System.InvalidCastException' occurred in Example1.exe

Additional information: QueryInterface for interface
Word._Application failed.

What could be the problem ? Can someone help me with an
answer.
Many Thanks
sudha
 
¤ Hi
¤ I want to automate word from c# program and i used the
¤ sample solution from MSDN to see how it works
¤ .
¤ I have .NET 2003 / office 2000
¤ the sample solution comes with a WORD.DLL
¤
¤ When i executed, i got a run time error :
¤ An unhandled exception of
¤ type 'System.InvalidCastException' occurred in Example1.exe
¤
¤ Additional information: QueryInterface for interface
¤ Word._Application failed.
¤
¤ What could be the problem ? Can someone help me with an
¤ answer.

You may want to post the line of code that is causing the error.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top