Using VBA to work with Portfolios
I am familiar with using VBA to add data to fields of PDF Forms and to combine two PDF Files together.
I am looking to work with PDF Portfolios - specifically, I need to be able to tell if a file is a portfolio, create a portfolio from separate PDF files, and add additional files to an existing portfolio.
For determining if the file is a portfolio, the code I found online suggested this (after getting to the jso object):
' The key is the Doc.collection property in the Acrobat JavaScript API
' For a standard PDF, it returns a null object; for a portfolio, it returns a collection object
If Not jso.Doc.collection Is Nothing Then
IsPDFPortfolio = True
End IfThe code is failing on the If statement for me with Error 438: Object does not support this property or method.
After a lot of searching I found:
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsdevguide/JS_Dev_PDFCreation.html?highlight=collection
That made me think I should be using:
If Not Doc.dataObjects is Nothing ThenOr perhaps:
If Not Doc.dataObjects() is Nothing ThenBut both of those give the same error.
Basically, the same question was asked here and never answered:
I’m not sure where to find the appropriate SDK. I think I had a copy a few years ago.
