Hello,
So as in another thread I posted I am getting an error msg during runtime which I belive it only occurs becuase I can't close my pdf's I am automating.
Below are the objects I create, and how I am attempting to close them, I have been googling and can't figure this out! While the pdf is hidden, if I check my memory usuage it is still sucking up memory!
<code>
Objects Created:
Set gapp = CreateObject("AcroExch.App")
Set gAvDoc = CreateObject("AcroExch.AVDoc")
Set gpdDoc = CreateObject("AcroExch.PDDoc")
gpdDoc.Open(strfiLe) And gAvDoc.Open(strfiLe, strfiLe & "temp")
Set jso = gpdDoc.GetJSObject
set Aform = CreateObject("AFormAut.App")
'And now my attempt at closing, they all dont cause errors unless noted
gapp.Exit
gapp.CloseAllDocs
gAvDoc.Exit 'Causes an error in Runtime
gpdDoc.Close
Aform.Exit 'Also causes an error in runtime
Set gAvDoc = Nothing
Set pdDoc = Nothing
Set Aform = Nothing
Set jso = Nothing
</code>
Does anyone know how to finish off killing this pdf? Thank you
So as in another thread I posted I am getting an error msg during runtime which I belive it only occurs becuase I can't close my pdf's I am automating.
Below are the objects I create, and how I am attempting to close them, I have been googling and can't figure this out! While the pdf is hidden, if I check my memory usuage it is still sucking up memory!
<code>
Objects Created:
Set gapp = CreateObject("AcroExch.App")
Set gAvDoc = CreateObject("AcroExch.AVDoc")
Set gpdDoc = CreateObject("AcroExch.PDDoc")
gpdDoc.Open(strfiLe) And gAvDoc.Open(strfiLe, strfiLe & "temp")
Set jso = gpdDoc.GetJSObject
set Aform = CreateObject("AFormAut.App")
'And now my attempt at closing, they all dont cause errors unless noted
gapp.Exit
gapp.CloseAllDocs
gAvDoc.Exit 'Causes an error in Runtime
gpdDoc.Close
Aform.Exit 'Also causes an error in runtime
Set gAvDoc = Nothing
Set pdDoc = Nothing
Set Aform = Nothing
Set jso = Nothing
</code>
Does anyone know how to finish off killing this pdf? Thank you