471,119 Members | 1,303 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,119 software developers and data experts.

calling word from .net

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

Nov 22 '05 #1
4 1853
Hi,

Which Word version do you have?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"sudha" <su*******@hotmail.com> wrote in message
news:01****************************@phx.gbl...
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

Nov 22 '05 #2
Hi,

Which Word version do you have?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"sudha" <su*******@hotmail.com> wrote in message
news:01****************************@phx.gbl...
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

Nov 22 '05 #3
On Thu, 13 Nov 2003 23:21:31 -0800, "sudha" <su*******@hotmail.com> wrote:

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 ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #4
On Thu, 13 Nov 2003 23:21:31 -0800, "sudha" <su*******@hotmail.com> wrote:

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 ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by sudha | last post: by
1 post views Thread by Asapi | last post: by
8 posts views Thread by Rob Kellow | last post: by
reply views Thread by Yohancef Chin | last post: by
3 posts views Thread by Scupper | last post: by
7 posts views Thread by John | last post: by
47 posts views Thread by teju | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.