Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
17

help: macro to print an excel to pdf with 92x92 paper size

New Here ,
Jan 08, 2024 Jan 08, 2024

I'm trying to script a n ecel macro to convert a xls file to pdf 92x92.

 

Dim newPrinter As String

newPrinter = GetPrinterFullName("AdobePDF")

Application.ActivePrinter = newPrinter

Workbooks.Open (InputfileName)

For Each sheet In Workbooks(InputfileName).Worksheets

sheet.PageSetup.PaperSize = ????

 

 

what kind of number do I have to use instead of "???".

With PdfCreator as a printer I used 162, now with  "Adobe Acrobat Pro DC 2015 version 2015.006.30172" this number dosesn't any more even if the paper size 92x92 is visible in the printer setting.

TOPICS
Create PDFs , Edit and convert PDFs , How to , Modern Acrobat , PDF
326
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2024 Jan 08, 2024
LATEST

What is the original size of the excel file? I can't help you with your macro, but consider using an Acrobat preflight fixup to change the size of your pdf saved or exported (not printed*) from excel. You can duplicate an existing preflight profile from the little fly-out menu (Options), edit the settings and save the profile to a new name. You can use the profile in an Acrobat Action to quickly re-size your pdf. Tools> Print Production> Preflight> Fixups.

*print to pdf will probably result in an image file (not vector), producing a much larger pdf.

scale to specific size.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines