473,394 Members | 1,766 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,394 software developers and data experts.

Open Word from Access problem

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")
myDoc.Versions(myDoc.Versions.Count).Open

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

Thanks.

- Bruce

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
1 3258
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\merge.dot"

Set mobjWordApp = New Word.Application
With mobjWordApp
.Visible = True
.WindowState = wdWindowStateMaximize
.Documents.Add Template:=(.Options.DefaultFilePath( _
wdUserTemplatesPath) _
& conTEMPLATE_NAME)
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Warner | last post by:
I have a wierd problem that I can't find any reference to in the knowledge base. I develop simple databases at the company where I work, and many of them are used by hundreds of employees. We all...
3
by: Andy Davis | last post by:
How do i or can I open a word document directly from Access? I would like to be able for the user to click a button on my form to open a word document and then also run a macro in Word. Thanks...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
1
by: Queenslander | last post by:
Hello, I have a form (Access 2003) which brings up a clients details on screen (name, phone number, etc etc), so that an end-user can modify any of these clients details, and save the updates....
6
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.