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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active X Component Can't Create Object

Status
Not open for further replies.

CC801340

IS-IT--Management
Jul 10, 2001
147
GB
Ive got the following code behind a command button:

DoCmd.TransferText transfertype:=acExportDelim, tablename:="Caterer Jobs", FileName:="e:\catererjobs.txt"

Dim WordDoc As Object
Dim WordApp As Object

Set WordApp = CreateObject(Word.Application)

Set WordDoc = GetObject("E:\catererjobs.txt", Word.Application)

I'm getting "Active X Component Can't Create Object" run time error....any ideas?!
 
The createObject requires that Word.Application be enclosed with Text Quotation ("Word.Application")



Dim WordApp
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "E:\catererjobs.txt", , True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top