S
Staunts
Hi all,
I am hoping someone can help. I need to run some sql and have it use
the results of that query to print out some documents.
Here is the query:
SELECT tblMyTable.Id, tblMyTable.Desc, tblMyTable.DocName
FROM tblMyTable
WHERE (((tblMyTable.Id)>5));
Results in this:
1 Desc1 Doc1.doc
2 Desc2 Doc2.doc
3 Desc3 Doc3.doc
4 Desc4 Doc4.doc
Ok ,
I need to loop thru the resultant set and print the Word Document
(DocName).
Here's the code I have for the printing part of that:
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open ("MyDoc.doc")
WordApp.ActiveDocument.PrintOut False
WordApp.ActiveDocument.Close False
WordApp.Quit
Set WordApp = Nothing
Does anyone know how I can do this, i.e. print docs Doc1/Doc2/Doc3/Doc4
?
ay help would be appreciated.
cheers
I am hoping someone can help. I need to run some sql and have it use
the results of that query to print out some documents.
Here is the query:
SELECT tblMyTable.Id, tblMyTable.Desc, tblMyTable.DocName
FROM tblMyTable
WHERE (((tblMyTable.Id)>5));
Results in this:
1 Desc1 Doc1.doc
2 Desc2 Doc2.doc
3 Desc3 Doc3.doc
4 Desc4 Doc4.doc
Ok ,
I need to loop thru the resultant set and print the Word Document
(DocName).
Here's the code I have for the printing part of that:
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open ("MyDoc.doc")
WordApp.ActiveDocument.PrintOut False
WordApp.ActiveDocument.Close False
WordApp.Quit
Set WordApp = Nothing
Does anyone know how I can do this, i.e. print docs Doc1/Doc2/Doc3/Doc4
?
ay help would be appreciated.
cheers