vba print to pdf with file name

Page 1

CLICKHERETO DOWNLOAD

Inthatcase,youwouldliketohaveitautomated, CliPdfApp/PrintTo"MicrosoftPrinttoPDF""MicrosoftPrinttoPDF""C:\MyFavouritePlaces\However fewappsfollowtherequiredconvention,soWordPadwillconvertDocxorRTFviacommandlinebutcannothandleaPDFandEdgeAFAIKwasnotdesigned tomakethePDFformatCLIprintfriendly:)ExampleVBAtoPrintRangetoPDFWithSheetTabNameasthePDFName6, EmbedVBAtoPrintAllSheets ofanExcelWorkbookinaSinglePDFInthissection,youwilllearnhowtoprintallthesheets(Sheet1,Sheet2,Sheet3)fromthe5, Iamwantingtoexport fromanAccessreporttoapdfwhonameisgovernedbythedatawithinthereportIhavethereportopenwhenruinningthisSelect|Wrap|LineNumbersTherest ofthevariablescanbeleftasitisstrReportName= Name&"-"& Hypérion+"pdf"Filename:ThisisthefullyqualifiednameofpdfIhaveexplainedthem afterexampleExample:PrintExcelreceiptasaPDFusingVBALet'ssayyouhavetoprintandsendreceiptsinExcelonaregularbasisExplanationofthe Code.Defineitasastring.ExampleVBAtoPrintRangetoPDFWithSpecifiedName.Ihavecreatedthecodebelowbutitisonlysavingthefileas .pdfandnot thevaluesIwant.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.