Hi there, I seek expert advice to solve the macro writing where I am facing a problem that cannot fit all characters in the pdf once generated.
This is the script:
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 = "Data") Or (ws.Name = "Summary")) Then
If Not (ws.Range("C17").Value = "0" Or ws.Range("C17").Value = "") And Len(Trim(ws.Range("C17").Value)) <> 0 Then
Awb.Sheets(ws.Name).Copy
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
Awb.Path & "\Payment Advice-" & Awb.Sheets(ws.Name).Range("C17") & "_" & Format(Awb.Sheets(ws.Name).Range("H10"), "yyyy.mm.dd") & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
ActiveWindow.Close False
End If
End If
Next ws
End Sub
Attached herewith excel for your reference. Many thanks for advice.
Bookmarks