473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 2967
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: name | last post by:
Here is a first attempt at a line/word wrapping utility. Seems to work okay, but lacks some checking stuff, etc. --------------------------------------------------------- #include <stdio.h>...
6
by: JerryP | last post by:
Hello, is there a way to launch the property dialogue for a directory from my c# app ? I would also like to launch the User Account Properties from Active Directory Users and Computers, and the...
4
by: Staticbob | last post by:
Guys, I have this code that loads some data from a SQL view into a datatable, then into arrays, I can then export it to a predefined Excel template that creates lots of fancy charts and stuff...
8
by: scorpion53061 | last post by:
My boss indicated he was pleased with the reports that were being generated in MS Word by me and that made me happy. However he also told me he wants the wait eliminated for Word to start up. I...
5
by: Jason James | last post by:
I all, I have a VB.Net app that words just fine when automating MS Word 2003, when Word is part of MS Office Professional edition (even with SP1 installed). However, if I install the app onto...
7
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the...
6
by: jimryder | last post by:
Hi, The following snippet: (ds is a populated dataset) string sXSLT = @"C:\XML\template\template.xsl"; string sTemp = @"C:\XML\temp\temp.xml"; string sOutput = @"C:\XML\output\output.xml";...
3
by: Niyazi | last post by:
Hi, Its like a I am searching alot but still not found or satisfy what I found it. My question is that I had SQL server that contains some data. I also have a application folder call...
2
by: dawnm.jordan | last post by:
Hi, I am working on a database used to store information, and then generate customized letters. I have most of it working, (Thanks to the posts in this group =)) I have a button which can be...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.