Could you please support me with this VBA code?
The code shows a window to select a printer in Word and print in prn file.
However, I need the following to make it work properly:
1.- A button in the windows to allow me to set up the printer I select.
2.- A "OK" button
3.- Make the "Cancel" button to stop the macro because when I press the button cancel still print the file.
'##################################
Sub PrinterSelectionInWord()
Dim bChoice As Boolean
Dim cChoice As Boolean
Dim filename As String
bChoice = Application.Dialogs(wdDialogFilePrintSetup).Show
ActiveDocument.PrintOut Range:=wdPrintCurrentPage, PrintToFile:=True, OutputFileName:="C:\Test\Test.prt"
If Not bChoice Then
VBA.MsgBox "User cancelled"
Else
VBA.MsgBox ActivePrinter, vbOKOnly, "Active Printer"
End If
If Not cChoice Then
VBA.MsgBox "Setup"
End If
End Sub
'##################################
Thanks in advance
Maperalia