Article ID: 107687
Article Last Modified on 8/16/2005
Sub MAIN
doc$ = Files$("*.DOC")
While doc$ <> ""
FilePrint .FileName = doc$
doc$ = Files$()
Wend
End Sub
The above macro uses the Files$() function and FilePrint statement to print
the documents with a .DOC file extension in the current folder.
ChDir "C:\WinWord" 'changes the current folder to C:\WINWORDNote: By specifying "*.DOC" on the first iteration and omitting it thereafter, you can use the Files$() function to generate a list of files. If no files match, an empty string ("") is returned.
Sub MAIN
FileNewDefault
doc$ = Files$("*.*")
While doc$ <> ""
Insert doc$
InsertPara
doc$ = Files$()
Wend
End Sub
Kbcategory: kbusage kbmacro
Additional query words: 6.0 print document FilePrint word6 word7 7.0 word95 winword Files$() FilePrintAll
Keywords: KB107687