K
kiln
Access & Word 2000.
Surprised this isn't totally simple. Using late binding from Access, I
need to print out a set of word docs in succession. During the list
iteration, the following fails with "this command is not available
because there is no document open", error 4248.
Set objWord = CreateObject("Word.Application")
objWord.Documents.Add strPath
objWord.ActiveDocument.PrintOut
objWord.ActiveDocument.Close SaveChanges:=0
I read here that one may printout directly from the application object,
which sounded better anyways, but the following code fails with "this
method or property is not available because a document window is not
active", error 4605.
objWord.PrintOut strPath
I see some API code at
http://www.pacificdb.com.au/MVP/Code/ExeFile.htm
but I'd still like to know how this is done via word automation.
Thanks
Surprised this isn't totally simple. Using late binding from Access, I
need to print out a set of word docs in succession. During the list
iteration, the following fails with "this command is not available
because there is no document open", error 4248.
Set objWord = CreateObject("Word.Application")
objWord.Documents.Add strPath
objWord.ActiveDocument.PrintOut
objWord.ActiveDocument.Close SaveChanges:=0
I read here that one may printout directly from the application object,
which sounded better anyways, but the following code fails with "this
method or property is not available because a document window is not
active", error 4605.
objWord.PrintOut strPath
I see some API code at
http://www.pacificdb.com.au/MVP/Code/ExeFile.htm
but I'd still like to know how this is done via word automation.
Thanks