SetTexT (24, 3, 'Page' + IntToStr (iCurrentPage) + 'of' + IntToStr (iPageCount));
PrintOrientation:=2;
PrintSheet;
PrintOrientation is to set the direction of the print, checked the help document
Setting the Description Constant
0 - the Default (the Default) Uses the current printer setting PrintOrientationDefault
1 - Portrait Prints sheet in Portrait mode PrintOrientationPortrait
2 - Landscape Prints sheet in Landscape mode PrintOrientationLandscape
2 is a horizontal print, when I set to 2 perform PrintSheet here will be an error
Access violation at address 77 c16fa3 in MSCVRT. DLL. Write Of address 07 fc100
Set to 1 s and 0 s won't complain, but set to 2 lateral printing error, MSCVRT. DLL. Replacing a few times also not line, also solve???