joehua
joehua

Reputation: 735

Different print preview

I have the following code to display print preview before printing.

rngprint.PrintOut Preview:=True

However, the print preview displayed is different from what I would get by selecting File/Print.

How do I get File/Print style print preview?

Upvotes: 1

Views: 171

Answers (1)

Pᴇʜ
Pᴇʜ

Reputation: 57683

Use the following instead

Application.CommandBars.ExecuteMso "PrintPreviewAndPrint"

It simulates a click on the ribbon button.

Upvotes: 2

Related Questions