PDA

Click to See Complete Forum and Search --> : Word Document


sueya
Aug 18th, 1999, 12:32 PM
I want to create a new word document in my
VB Application and edit it to contain the results of an SQL query. I've been using
CreateObject(Word.Basic) but I get a "Active X cannot create document" message when i try this. Why?

llee
Aug 19th, 1999, 01:54 PM
Firstly, do you have MS Word installed at you PC.
If you do, maybe you can try this

Dim wd as object

set wd = createObject("Word.Application")

wd.documents.add [document name]
.
.
.

wd.activedocument.close 0 (no save)
wd.quit 0