Posted 8 September 2017, 2:54 pm EST
I have a sheet that I want to print landscape.
All the printinfo parameters are set correctly. When I set .ShowPrintDialog = True the sheet is printed portrait and not landscape. If I set .ShowPrintDialog = False then it's printed landscape.
Is this a bug?
I have tried this using Spread versions 3.0.2010.2005 and 5.0.3514.2008 on different machines and it behaves the same everywhere.
Here is the code i'm using for printing:
<font face="courier new,courier"> With fpB.ActiveSheet.PrintInfo
If ShiftIsDown() Then
.Preview = True
.Preview = False
.Orientation = FarPoint.Win.Spread.PrintOrientation.Landscape
.ShowBorder = False
.ShowColumnHeaders = False
.ShowRowHeaders = False
.ShowGrid = False
.RepeatRowStart = 5
.RepeatRowEnd = 5
.Margin.Left = 100 / 2.54
.Margin.Top = 100 / 2.54
.Margin.Bottom = 100 / 2.54
.Margin.Right = 50 / 2.54
.Header = ControlChars.CrLf + ControlChars.CrLf
.Footer = "Buchungsjournal " + " ohne PrintDialog " + "/rSeite /p"
.JobName = "Fibujournal"
.ShowPrintDialog = True
.UseMax = True
I have done some more research. This suddenly happens in all apps that use ShowPrintDialog = True. At the moment it looks like this has possibly been introduced by a recent windows update. In on virtual machine where I have not made windows updates for a long time everything works fine.