bonekrusher
Registered User.
- Local time
- Yesterday, 23:25
- Joined
- Nov 19, 2005
- Messages
- 266
Thought this could be useful. The following code will open a PDF inside a form.
Insert the PDF activeX control and name it "viewer".
Make sure you add the Adobe OLE reference ("adobe"), if not the code will be undefined.
Insert the PDF activeX control and name it "viewer".
Make sure you add the Adobe OLE reference ("adobe"), if not the code will be undefined.
Code:
Private Sub Command18_Click()
Dim AcroApp As CAcroApp
Dim AVDoc As CAcroAVDoc
Dim PDDoc As CAcroPDDoc
Set AVDoc = CreateObject("AcroExch.AVDoc")
Set AcroApp = CreateObject("AcroExch.App")
Set PDDoc = AVDoc.GetPDDoc
Me.Viewer.loadFile ("C:\yourfile.pdf")
End Sub