(Solved) – Open Print and Preview Dialog with “To/From” and “Number of Copies” prefilled

(solved)-–-open-print-and-preview-dialog-with-“to/from”-and-“number-of-copies”-prefilled

I have a “Print button” in a UserForm. When hitting the button i want the “Print and Preview” dialog to show and “To”-“From” and “Number of copies” to be prefilled.

To open the “Print and Preview Dialog” I use this code, which works perfect:

Application.CommandBars.ExecuteMso “PrintPreviewAndPrint”

I found this code to prefill the Print Dialog settings. Works perfect to.

Application.Dialogs(xlDialogPrint).Show , 1, 2, 3

I have tried to combine these two codes in a variety of ways, but with out luck.
Does anyone knows if this i doable?

Leave a Reply

Your email address will not be published. Required fields are marked *