How to auto convert to PDF from excel using VBA?

0 votes
asked by about Nuance PDF Converter Professional
edited by

now I am using pdf converter professional 8 on EXCEL 2019 and i want to auto convert to PDF from excel using VBA. If you have sample code then please let me advice. also I want to know add in.

1 Answer

0 votes
answered by (78.3k points)

Here is a sample VBA code that you can use to auto convert excel files to PDF using Nuance PDF Converter Professional 8:

Sub ConvertToPDF()
Dim PDFConv As Variant
Dim ExcelFile As String
Dim PDFFile As String

ExcelFile = ActiveWorkbook.FullName
PDFConv = CreateObject("NuancePDFConverterProfessional8.NuanceConverterProfessional")

'Set the path of the output PDF file
PDFFile = Replace(ExcelFile, ".xlsx", ".pdf")

'Convert the file to PDF
PDFConv.OpenInputFile ExcelFile
PDFConv.SetConvertToPDFFileName PDFFile
PDFConv.ConvertToPDF
PDFConv.CloseInputFile
Set PDFConv = Nothing

End Sub

To add the Nuance PDF Converter Professional add-in, please follow these steps:

  1. Open Excel 2019.
  2. Click on the "File" tab and select "Options".
  3. In the "Excel Options" window, select "Add-Ins" in the left menu.
  4. At the bottom of the window, select "Excel Add-ins" from the "Manage" dropdown menu and click "Go".
  5. In the "Add-Ins" window, click on the "Browse" button and navigate to the folder where Nuance PDF Converter is installed.
  6. Select the "NuancePDFConverterProfessional8.xlam" file and click "Open".
  7. The add-in should now appear in the list of available add-ins. Check the box next to it and click "OK".

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...