Forum Discussion

cagross's avatar
cagross
Copper Contributor
Oct 10, 2020
Solved

VBA for Excel (365), how to print to PDF, while scaling to fit all columns to a single page wide?

Hello. Using VBA for Excel (Office365), how can I print an Excel worksheet to PDF, while scaling to fit all columns to a single page wide? In my VBA script, I have already set: `FitToPagesWide = 1`. Here is more information.

 

For the past few years I've used Office 2013, and with it, a particular VBA for Excel script which would print a worksheet to PDF, while scaling to fit all columns to a single page wide. I recently updated to Office365 and the same VBA script is now printing to PDF, but not scaling to fit all columns to a single page wide. Any ideas why that is occurring and how to resolve it?


See https://pastebin.com/GrTuCffb for my VBA function.

 

Thanks in advance.

 

  • cagross's avatar
    cagross
    Dec 03, 2020

    NikolinoDE Sorry for the late reply. Thanks for the help.  I was able to resolve the issue in another MS forum (https://social.msdn.microsoft.com/Forums/lync/en-US/5295c5e4-7517-41f5-a341-99b84035c59a/with-vba-for-excel-office365-how-can-i-print-a-worksheet-to-pdf-while-scaling-to-fit-all-columns?forum=exceldev).

7 Replies

Resources