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?
Printable View
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?
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