J
Joanne
I have an access app that opens 8 to 10 docs in MSWord.
Am using office 2000 on winxp machine
The docs open just fine for viewing.
Now while they are open I want to give the user the opportunity to
print all of the open documents on one click of the mouse.
How do I code msword to print all open docs, such as:
print doc
close doc
print the next doc
close the next doc
etc
close app (This I know how to do
This is what I tried, by just calling to the docs from the folder and
printing them, and then I would have closed all the files and exited
the application, but it doesn't work for me.
Sub PrintAllDocs()
Dim sMyDir As String
Dim sDocName As String
' The path to obtain the files.
sMyDir = "C:\NMWorkPkg\Benefits\"
sDocName = Dir(sMyDir & "*.DOC")
While sDocName <> ""
' Print the file.
Application.PrintOut FileName: = sDocName
' Get next file name.
sDocName = Dir()
Wend
End Sub
I found this snippet of code thru a google search and adapted it to my
scenario.
Anyway, I am getting no where right now and sure could use a little
nudge of help
Thanks for your time and consideration of my problem
Am using office 2000 on winxp machine
The docs open just fine for viewing.
Now while they are open I want to give the user the opportunity to
print all of the open documents on one click of the mouse.
How do I code msword to print all open docs, such as:
print doc
close doc
print the next doc
close the next doc
etc
close app (This I know how to do
This is what I tried, by just calling to the docs from the folder and
printing them, and then I would have closed all the files and exited
the application, but it doesn't work for me.
Sub PrintAllDocs()
Dim sMyDir As String
Dim sDocName As String
' The path to obtain the files.
sMyDir = "C:\NMWorkPkg\Benefits\"
sDocName = Dir(sMyDir & "*.DOC")
While sDocName <> ""
' Print the file.
Application.PrintOut FileName: = sDocName
' Get next file name.
sDocName = Dir()
Wend
End Sub
I found this snippet of code thru a google search and adapted it to my
scenario.
Anyway, I am getting no where right now and sure could use a little
nudge of help
Thanks for your time and consideration of my problem