0

I am trying to import annotations from one file to another using VBA through adobe Javascript object interface.

So I want to export the fdf file of the pdf, so I am using exportAsFDF method.

However, it is exporting an FDF file without the annotations, only linking to the main file, which is different from the fdf file exported from Adobe GUI.

Here is my code below. I am already considering including annotations as True, which is the last parameter in exportAsFDF.

So does anyone know what's wrong with the code below?

Sub importComments() 

 

    Set AcroApp = CreateObject("AcroExch.App") 

    Set compositeDocument = CreateObject("AcroExch.PDDoc") 

     

    compositeDocument.Open ("C:\Users\...\sample.pdf") 

    Set sourceJSObject = sourceDocument.GetJSObject() 

    Set compositeJSObject = compositeDocument.GetJSObject() 

 

    Path = "C:\Users\C:\Users\...\trials.fdf" 

    Debug.Print compositeJSObject.exportAsFDF(True, True, "", True, Path, True) 

 

End Sub 
user9559590
  • 103
  • 1
  • 8

0 Answers0