Combining PDFs stopped working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've used this sub for years to combine pdfs into a multisheet pdf. All of the sudden it stopped working. It crashes on this line.
b = PDDocAll.Open(arrPdfFiles(0))
It gives this error.
I'm on Windows 8.1 in AutoCAD 2016 using VBA and using Acrobat Pro DC.
Below is the complete sub.
Any ideas why it's stopped working.
David
Private Sub CombinePDFs(arrPdfFiles() As String, strFileName As String)
Dim PDFApp As AcroApp
Dim b As Boolean
Dim PDDocAll As CAcroPDDoc
Dim PDDoc As CAcroPDDoc
Dim i As Integer
'On Error Resume Next
Set PDFApp = CreateObject("AcroExch.App")
Set PDDocAll = CreateObject("AcroExch.PDDoc")
Set PDDoc = CreateObject("AcroExch.PDDoc")
b = PDDocAll.Open(arrPdfFiles(0))
b = PDDocAll.Save(1, strFileName)
Kill arrPdfFiles(0)
For i = 1 To UBound(arrPdfFiles)
b = PDDoc.Open(arrPdfFiles(i))
b = PDDocAll.InsertPages(i - 1, PDDoc, 0, 1, False)
b = PDDocAll.Save(1, strFileName)
b = PDDoc.Close
Kill arrPdfFiles(i)
Next
b = PDDocAll.Close
End Sub