Excel Export to PDF Font Size and Style

chegra26

Board Regular
Joined
Jun 7, 2014
Messages
90
I have a custom user form that I have set up to automatically save as PDF, however when I print the document, the font is small. What is the VBA code to set Font settings upon exporting to PDF? My code is as follows: Everything looks great except for when it prints.

'Code to Print the form or Export to PDF

sh.PageSetup.PrintArea = "$A$1:$N$106"



'sh.PrintOut copies:=1, IgnorePrintAreas:=False

sh.ExportAsFixedFormat xlTypePDF, ThisWorkbook.Path & Application.PathSeparator & frmform.txtlname.Value & ", " & frmform.txtfname.Value & " " & frmform.txtclient.Value & ".pdf"


MsgBox "Client Information has been printed.", vbOKOnly + vbInformation, "Print"

Application.ScreenUpdating = True
Application.DisplayAlerts = True


End Sub
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
What are your Printer Setup settings? Your print area is rather big so it looks like it might be set to fit to one page.
 
Upvote 0
What are your Printer Setup settings? Your print area is rather big so it looks like it might be set to fit to one page.
I have adjusted the print area settings but the font still prints rather small. The printer Setup settings are not defined in the VBA. The code only saves the document as a PDF
 
Upvote 0
If you go to "Page Setup" - "Page" - "Scaling" - "Adjust To", what value do you see?
 
Upvote 0
right now it is on custom 100% but i have tried None, Fit to Printer margins and Reduce to printer margins. Maybe it would be easier to just export the spreadsheet to word. Can you help with the VBA to export to a word document?
 
Upvote 0
Why would you not try to fix the problem?
Looks like you need to check all your settings.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,974
Members
449,095
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top