Hi,
Thanks for the code Juan (and Ivan)
The structure of the objects in Adobe reminds me about Lotus Notes (which LotusScript I also dislike...)
Nevertheless, the below procedure will open a PDF-file and a reference must be made to Adobe Acrobat x.0 Type Library:
<PRE>
<FONT color=blue>Sub </FONT>Open_PDF()
<FONT color=blue>Dim </FONT>AcroApp<FONT color=blue> As</FONT> Acrobat.CAcroApp
<FONT color=blue>Dim </FONT>PDDoc<FONT color=blue> As</FONT> Acrobat.CAcroPDDoc
<FONT color=blue>Dim </FONT>avDoc<FONT color=blue> As</FONT> Acrobat.CAcroAVDoc
<FONT color=blue>Set </FONT>AcroApp = CreateObject("AcroExch.App")
<FONT color=blue>Set </FONT>PDDoc = CreateObject("AcroExch.PDDoc")
<FONT color=blue>If </FONT>PDDoc.Open("e:Datahantering.pdf") Then
AcroApp.Show
<FONT color=blue>Set </FONT>avDoc = PDDoc.OpenAVDoc("")
<FONT color=blue>Else</FONT>
MsgBox "Unable to open the PDF-file", vbInformation
<FONT color=blue>End If</FONT>
<FONT color=blue>Set </FONT>avDoc =<FONT color=blue> Nothing</FONT>
<FONT color=blue>Set </FONT>PDDoc =<FONT color=blue> Nothing</FONT>
<FONT color=blue>Set </FONT>AcroApp =<FONT color=blue> Nothing</FONT>
<FONT color=blue>End Sub</FONT>
</PRE>
In order to execute it successfully the total package of Acrobat Reader must be installed (it is not sufficient to have teh client-version only).
Kind regards,
Dennis