I would like to be able to use the FromPage and ToPage option in the printer dialog box using ShowPrint.
But the FromPage and ToPage options are still greyed.

How can I get it work ?...

Many thanks,
Thierry

With CMDialog
.Flags = cdlPDReturnDC
.Flags = .Flags + IIf(Text1.SelLength > 0, cdlPDSelection, cdlPDNoSelection + cdlPDAllPages + cdlPDPageNums)
.CancelError = True
On Error GoTo TantPis
.ShowPrinter ' ouvre la boîte de dialogue

Printer.Orientation = .Orientation
.
.
.
End With