By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

Open Word from Access problem

P: n/a
In Access 2000.
Microsoft Word 9.0 Object Library reference is set.

I got the following two pieces of code from Help from the Object
Browser. Both of them are giving me the same error: "Run Time Error
'429' ActiveX Component Can't Create Object"

Code # 1:

Documents.Open FileName:="blah.doc", ReadOnly:=True

Code # 2:

Set MyDoc = Documents("blah.doc")

blah.doc, of course is the name of my own file; it is located in the
same folder as my .mdb file.


- Bruce

*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
syntax should look something like this:

****** Code Start ********
'This code was originally written by Dev Ashish
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'Code Courtesy of
'Dev Ashish
Private mobjWordApp As Word.Application

Private Sub Command1_Click()
Const conTEMPLATE_NAME = "\Templates\"

Set mobjWordApp = New Word.Application
With mobjWordApp
.Visible = True
.WindowState = wdWindowStateMaximize
.Documents.Add Template:=(.Options.DefaultFilePath( _
wdUserTemplatesPath) _
End With
End Sub
'****** Code End ********

You never set a reference to Word - no early or late binding... that's
part of the problem.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.