Forum Discussion
VBA for Excel (365), how to print to PDF, while scaling to fit all columns to a single page wide?
- 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).
In order not to be misunderstood, the goal of some Excel users in the community is to provide help with projects by Excel users, or rather to provide food for thought.
As part of this excellent forum, my aim is to give help to get help where I can and need it.
That's why I try (like some others here) to help voluntarily as far as I can.
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
VerzeichnisName & "\" & Name, Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
With ActiveSheet.PageSetup
.Zoom = False
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
'Check your code to see if you have used zoom correctly.
'Is just a suggestion doesn't have to be right ...
'because I know that I don't know anything.
The only thing I can do for you is this VBA code.
But since I don't have a 365 Office desktop version (like you, as far as I could see your written version) I can't help you any further.
I think that one of Microsoft will take care of your question.
I'm sure they will give you a specific or official answer.
In the meantime, please be patient, we have weekend 🙂
Sorry that I took your time and couldn't give you a quick solution.
Wish you a nice day/night.
Nikolino
I know I don't know anything (Socrates)
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).