1 Reply Latest reply on Sep 25, 2013 7:39 AM by Gyan1010

    app.openDoc only working for .pdf not anything needing conversion


      So I've been trying to add to a script i wrote in AutoIt that gives it the ability to convert a .html file to a .pdf


      AutoIt uses similar object creation to VBScript, and I've been able to access the JSObject with


      $oApp = ObjCreate("AcroExch.App")
      $oAVDoc = ObjCreate("AcroExch.AVDoc")
      $oPDDoc = $oAVDoc.GetPDDoc
      $oJSO = $oPDDoc.GetJSObject


      Then from here, I can open a different pdf just fine with something like





      But when i try




      it fails and the console shows


      NotAllowedError: Security settings prevent access to this property or method.


      I tried using this next




      but i got the same result.


      I want to try and use the bUseConv parameter but I'm not sure how to since in autoit I don't think you can do something like


      $oJSO.app.openDoc({cPath: "C:\test.htm", bUseConv: true})


      you need to use all the parameters before that and I'm not sure what to use for oDoc and the things I have tried all fail.


      $oJSO.app.openDoc("C:\test.htm", ???, "", false, true)


      I hope someone can help, thanks!