MorpheusX
Wed Jul 12 06:51:01 CDT 2006
Dear Graham,
I did use your first code and still the same problem. But I just some other
code of your site which did work.
Sub HPPrintDialog()
Dim sPrinter As String
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = "HP LaserJet 4050 Series PS"
.DoNotSetAsSysDefault = True
.Execute
Dialogs(wdDialogFilePrint).Show -------> changed this in Execute
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
End Sub
I still think it is strange that your first code at your site did not work,
but now it is working. Do you now how it is possible why the other code isn't
working i'm still interested in that one.
Thank you for your help.
"Graham Mayor" wrote:
> You might do better with the code at
http://www.gmayor.com/fax_from_word.htm
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site
http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> MorpheusX wrote:
> > Hello all,
> >
> > because we have multiple printers , we have created a macro which is
> > assigned to a button in the toolbar to directly print to a printer.
> > this is easy because we don't have to go to file, print and then
> > select a printer. The only thing that happens is that MS Word is no
> > longer responding. I will post the code here can anyone help me.
> >
> > code:
> >
> > Sub secprint()
> >
> > ActivePrinter = "pdf"
> > Application.PrintOut Range:=wdPrintAllDocument,
> > Item:=wdPrintDocumentContent, Copies:=1
> >
> > End Sub
>
>
>