i have excel file and after convert to pdf , there are many empty margin in page. but if i convert excel to jpg and with acrobat reader convert jpg to pdf , then there is no margin and empty margin .
i adjust page zoom,printarea,scale to fit , software printer , print to file , save as pdf and etc .
are have any macro to do it for entire workbook , without any empty margin ? if these macro have these option is very good
1- printarea by default selected for each sheets , for to convert in pdf
2-export pdf use minimum size pdf format .
3-TOTAL MARGIN SET 0.25 INCH
- Option Explicit
- Sub Print_PDF()
- Dim Awb As Workbook
- Dim Snr As Integer
- Dim ws As Worksheet
- Set Awb = ActiveWorkbook For Each ws In Awb.Sheets If Not ws.Name = "Sheet1" Then 'Sheets(ws.Name).Copy Awb.Sheets(ws.Name).Copy 'Sheets(ws.Name).Select ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ Awb.Path & "\" & Awb.Sheets(ws.Name).Name & ".pdf", _ Quality:=xlQualityStandard, IncludeDocProperties:=True, _ IgnorePrintAreas:=False, OpenAfterPublish:=False ActiveWindow.Close False End If
- Next ws
- end sub
for example i attached xlsm file to try on it in google drive