Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening word - Automation Error

Status
Not open for further replies.

netcashin

Programmer
Nov 13, 2000
159
US
I have a dialog box where I chose a file and then in code the word document is opened. Pretty basic. The code runs fine on one computer, but I moved the code & program to my laptop, I get an error. I have moved the whole code, not an executable.

The error I receive is:
--------------------------------------------------
Run-time error -2147417851 (80010105)

Automation error
The server trew an exception
--------------------------------------------------
Here is the essential code, the error happens at the third line.

strFileName = diaWordFile.FileName

Set objword = New Word.Application

Set objdoc = objword.Documents.Open(strFileName)




Thank you for any help you can provide.
 
Does the laptop have the same version of word? Not sure if this would cause the same error, but it could be because of the object library which is referenced.

You've heard about the computer programmer that died while washing his hair in the shower. The instructions said, 'Lather, rinse, repeat.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top