469,570 Members | 1,709 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,570 developers. It's quick & easy.

Launching Word 2003 in prog creates exception

Bob
I'm getting error 8007007e when executing the following code.
Dim word As New Microsoft.Office.Interop.Word.Application
Dim doc As Microsoft.Office.Interop.Word.Document
doc = word.Documents.Open(WordFileName.ToString)
doc.Activate()
word.Visible = True

This code works on the development machine, but does not work on a test
machine. The test machine is set up to use Office 2003, same as the
development one.
I can open the document directly with Word 2003, no problem. so the doc is
not corrupted.

Any help would be greatly appreciated.

Bob
Aug 13 '06 #1
5 2828
Bob wrote:
I'm getting error 8007007e when executing the following code.
Dim word As New Microsoft.Office.Interop.Word.Application
Dim doc As Microsoft.Office.Interop.Word.Document
doc = word.Documents.Open(WordFileName.ToString)
doc.Activate()
word.Visible = True

This code works on the development machine, but does not work on a test
machine. The test machine is set up to use Office 2003, same as the
development one.
I can open the document directly with Word 2003, no problem. so the doc is
not corrupted.

Any help would be greatly appreciated.

Bob

Did you send over the inerop dll to the production machine?
Aug 13 '06 #2

if i remember correctly 8007007e="Createobject failed" so this
automaticly means that
this is a COM error

you are missing a dependancy or the dependancy is a com component and not
correctly registred

..Net creates automaticly a proxy dll if you set a direct reference ( i
prefer to use late binding when i use COM components )
so you probably forgot to include the automaticly generated proxy dll (
should be in the BIN directory )

regards

Michel Posseth [MCP]
"Bob" <bd*****@sgiims.comschreef in bericht
news:em**************@TK2MSFTNGP06.phx.gbl...
I'm getting error 8007007e when executing the following code.
Dim word As New Microsoft.Office.Interop.Word.Application
Dim doc As Microsoft.Office.Interop.Word.Document
doc = word.Documents.Open(WordFileName.ToString)
doc.Activate()
word.Visible = True

This code works on the development machine, but does not work on a test
machine. The test machine is set up to use Office 2003, same as the
development one.
I can open the document directly with Word 2003, no problem. so the doc is
not corrupted.

Any help would be greatly appreciated.

Bob


Aug 13 '06 #3
Bob
Yes, they got detected when I made the setup program and got installed in
the application's folder. There are actually 6 files that got installed.
Bob
"Chris" <no@spam.comwrote in message news:44**************@spam.com...
Bob wrote:
>I'm getting error 8007007e when executing the following code.
Dim word As New Microsoft.Office.Interop.Word.Application
Dim doc As Microsoft.Office.Interop.Word.Document
doc = word.Documents.Open(WordFileName.ToString)
doc.Activate()
word.Visible = True

This code works on the development machine, but does not work on a test
machine. The test machine is set up to use Office 2003, same as the
development one.
I can open the document directly with Word 2003, no problem. so the doc
is not corrupted.

Any help would be greatly appreciated.

Bob


Did you send over the inerop dll to the production machine?

Aug 13 '06 #4
Bob
What would be the name of the generated proxy dll that needs to be included?
I look at the files in the application's folder. I have a file
office.dll,
Microsoft.Office.interop.Word.dll,
Microsoft.Office.interop.SmartTag.dll,
Microsoft.Office.tools.Common.dll,
Microsoft.Office.tools.Common.xml
Microsoft.Office.tools.Word.dll
Microsoft.Office.tools.Word.xml
Microsoft.Vbe.Interop.dll
Microsoft.VisualStudio.OfficeTools.Controls.Manage dWrapper.dll
Microsoft.VisualStudio.Tools.Applications.Runtime. dll
Microsoft.VisualStudio.Tools.Applications.Runtime. tlb
Microsoft.VisualStudio.Tools.Applications.Runtime. xml
VSTOStorageWrapper.Interop.dll
These are all the files whose references got detected automatically and
included when I made the installer project.
In my application development project's references I have
Microsoft.Office.Tools.Word in the list.

Thanks for your help.
Bob
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:u%****************@TK2MSFTNGP04.phx.gbl...
>
if i remember correctly 8007007e="Createobject failed" so this
automaticly means that
this is a COM error

you are missing a dependancy or the dependancy is a com component and
not correctly registred

.Net creates automaticly a proxy dll if you set a direct reference ( i
prefer to use late binding when i use COM components )
so you probably forgot to include the automaticly generated proxy dll
( should be in the BIN directory )

regards

Michel Posseth [MCP]
"Bob" <bd*****@sgiims.comschreef in bericht
news:em**************@TK2MSFTNGP06.phx.gbl...
>I'm getting error 8007007e when executing the following code.
Dim word As New Microsoft.Office.Interop.Word.Application
Dim doc As Microsoft.Office.Interop.Word.Document
doc = word.Documents.Open(WordFileName.ToString)
doc.Activate()
word.Visible = True

This code works on the development machine, but does not work on a test
machine. The test machine is set up to use Office 2003, same as the
development one.
I can open the document directly with Word 2003, no problem. so the doc
is not corrupted.

Any help would be greatly appreciated.

Bob



Aug 13 '06 #5
Bob
Thanks Michael
I'm not using late binding because that means that I gotta put Otion strict
to Off and also that I don't get any intellisense when I develop.
I need to find a way to resolve this problem using early binding.

Thanks
Bob

"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:u%****************@TK2MSFTNGP04.phx.gbl...
>
if i remember correctly 8007007e="Createobject failed" so this
automaticly means that
this is a COM error

you are missing a dependancy or the dependancy is a com component and
not correctly registred

.Net creates automaticly a proxy dll if you set a direct reference ( i
prefer to use late binding when i use COM components )
so you probably forgot to include the automaticly generated proxy dll
( should be in the BIN directory )

regards

Michel Posseth [MCP]
"Bob" <bd*****@sgiims.comschreef in bericht
news:em**************@TK2MSFTNGP06.phx.gbl...
>I'm getting error 8007007e when executing the following code.
Dim word As New Microsoft.Office.Interop.Word.Application
Dim doc As Microsoft.Office.Interop.Word.Document
doc = word.Documents.Open(WordFileName.ToString)
doc.Activate()
word.Visible = True

This code works on the development machine, but does not work on a test
machine. The test machine is set up to use Office 2003, same as the
development one.
I can open the document directly with Word 2003, no problem. so the doc
is not corrupted.

Any help would be greatly appreciated.

Bob



Aug 14 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by name | last post: by
4 posts views Thread by Staticbob | last post: by
8 posts views Thread by scorpion53061 | last post: by
5 posts views Thread by Jason James | last post: by
6 posts views Thread by jimryder | last post: by
3 posts views Thread by Niyazi | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.