docmd.outputto - shrink to fit on one page

uyuni

New member
Local time
, 20:35
Joined
May 7, 2013
Messages
5
I am trying to output a form into pdf using DoCmd.OutputTo

One of the forms is quite large and does not fit on one page. I tried to specify the 11x17 size paper and it seems to work on my computer, but not a different machine.

1. Is it possible to specify something akin "shrink to fit" so the form will fit on one page?

2. If not, does anyone know why 11x17 works on my machine but not a different one?

The code is

With Forms(sysForm.Name).Printer
.PaperSize = acPRPS11x17
.Orientation = acPRORLandscape
.LeftMargin = 360: .RightMargin = 360: .TopMargin = 360: .BottomMargin = 360
End With
DoCmd.OutputTo acOutputForm, sysForm.Name, acFormatPDF, strFileName, True


Thanks a lot!
 
I am trying to output a form into pdf using DoCmd.OutputTo

One of the forms is quite large and does not fit on one page. I tried to specify the 11x17 size paper and it seems to work on my computer, but not a different machine.

1. Is it possible to specify something akin "shrink to fit" so the form will fit on one page?

2. If not, does anyone know why 11x17 works on my machine but not a different one?

The code is

With Forms(sysForm.Name).Printer
.PaperSize = acPRPS11x17
.Orientation = acPRORLandscape
.LeftMargin = 360: .RightMargin = 360: .TopMargin = 360: .BottomMargin = 360
End With
DoCmd.OutputTo acOutputForm, sysForm.Name, acFormatPDF, strFileName, True


Thanks a lot!

Perhaps there is a different printer definition on the second computer, which does not support 11 X 17 size.

What are the default printers on the two computers? Do they both use the same defined printer, or different printers?
 
On the first question. Forms are not designed to be printed, although it is possible to do so anyway. If it's important to put the full content on one page, it's going to be far easier to create a report and size it appropriately. It can be reasonable reasonably similar to the form, if needed, but the point is that there are different tools for different, specific needs. It's almost always easier to work with the right tool for the job than to try to hammer away with the wrong tool.
 
Thank you George. There are a bunch of forms and I was trying to save time, as all of them except one fit just fine. Wrt the default printer, does it matter if I use acFormatPDF in my output statement?
 
I'd also like to know the answer to George's question. Did you check what was the default printer for the other computer?
 

Users who are viewing this thread

Back
Top Bottom