barry was telling us:
barry nous racontait que :
Is this the proper syntax to print a word 2007 document to a file
instead of a printer
ActiveDocument.PrintOut OutputFileName:="c:\zzz.docx", PrintToFile:=1
Try this:
Dim strFileName As String
strFileName = ActiveDocument.FullName
strFileName = Left(strFileName, Len(strFileName) - 4) & ".prn"
Application.PrintOut PrintToFile:=True, _
OutputFileName:=strFileName
Don't forget to turn on the printer, even tough you are printing to file...
(Printing to file produces a document to be printed later on a specific
printer.)
Depending on what you are doping, you will probably need more code to turn
off "Print to File" aw this setting is stocky.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org