Sticky PrintToFile

B

bleda01

I have a macro that prints the current document to file using the following
code:

With Dialogs(wdDialogFilePrint)
.Background = False
.AppendPrFile = False
.Range = wdPrintAllDocument
.PrToFileName = "c:\temp\prfile.prn"
.OutputPrinter = "FilePrinter on FILE:"
.Execute
End With

The trouble is when the user wants to do a normal print after using this
macro. The Print To File setting has been remembered. After an extensive
search, the only solution I have found is on the MVPS site:

http://word.mvps.org/FAQs/MacrosVBA/ResetPrintToFile.htm

But this solution is not ideal when the current printer is actaully a
printer which normally prints to file. The offered soultion causes the user
to be prompted for a filename which just confuses the user and if the enter a
file name, a file is created.

Has anybody found another way to reset PrintToFile that does not involve
printing a no page document?
 
B

bleda01

Thanks for the quick reply Graham. I had already found your site but none of
the techniques demonstrated will solve my problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top