Error trying to open MS Word 
Author Message
 Error trying to open MS Word

Not sure how to get around this error--
I'm getting an error when trying to open a word document. The error I get
is: 'Active X component can't create object'

Here is the code:

   Dim objWord

   Sub Btn1_onclick()
     call OpenDoc("http://myserver/myfile.doc")
   End Sub

   Sub OpenDoc(strLocation)
     Set objWord = CreateObject("Word.Application")
     objWord.Visible = true
     objWord.Documents.Open strLocation
   End Sub

The code is taken directly from a Microsoft KB article.
Thanks for your help!

Dave



Wed, 24 Jul 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Error trying to open MS Word

2. VB tries to Open MS Access DB [ERROR]

3. VB tries to Open MS Access DB [ERROR]

4. Error when trying to open Excel from a Word Macro

5. Open word-file in MS Word from link in IE

6. FollowHyperlink error in MS Word 2000 - Opening web page

7. How does one look at data in an open MS access aplication from MS Word

8. How does one look at data in an open MS access aplication from MS Word

9. App tries to open DB as MS Access 1.1 fmt instead of 2.0

10. Weird ASP error when trying to add a new record to a MS Access database

11. Trying to Not Open Multiple Copies of Word

12. Word freezes trying to run macro or open vba using Alt-F11

 

 
Powered by phpBB® Forum Software