2020. 2. 26. 11:54ㆍ카테고리 없음
Excel 2003 Vba Export To Pdf Converter
Sub PrintToPDFEarly'Author: Ken Puls (www.excelguru.ca)'Macro Purpose: Print to PDF file using PDFCreator' (Download from Designed for early bind, set reference to PDFCreatorCOLOR='Red'Dim pdfjob As PDFCreator.clsPDFCreator/COLORDim sPDFName As StringDim sPDFPath As StringDim bRestart As Boolean'/// Change the output file name here! ///sPDFName = 'testPDF.pdf'sPDFPath = ActiveWorkbook.Path & Application.PathSeparator'Check if worksheet is empty and exit if soIf IsEmpty(ActiveSheet.UsedRange) Then Exit Sub'Activate error handling and turn off screen updatesOn Error GoTo EarlyExitApplication.ScreenUpdating = FalseSet pdfjob = New PDFCreator.clsPDFCreator'Check if PDFCreator is already running and attempt to kill the process if soDobRestart = FalseSet pdfjob = New PDFCreator.clsPDFCreatorIf pdfjob.cStart('/NoProcessingAtStartup') = False Then'PDF Creator is already running.