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.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
barry - 14 Aug 2007 01:51 GMT
Thanks for you response. Something you said in your response has given me
the answer to my problem.
thanks
> barry was telling us:
> barry nous racontait que :
[quoted text clipped - 20 lines]
> Depending on what you are doping, you will probably need more code to turn
> off "Print to File" aw this setting is stocky.
Jean-Guy Marcil - 14 Aug 2007 02:59 GMT
barry was telling us:
barry nous racontait que :
> Thanks for you response. Something you said in your response has
> given me the answer to my problem.
> thanks
I am glad you could find something useful in the gibberish I posted...
Sorry, I forgot to spell-check it...

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org