Hi
I been trying to solve this problem I've been having which involves inserting a PDF document into a frame. The strange thing about this problem is it works first time around but doesnt on the second time, I've stepped through the code and it executes the snippet of code which inserts the PDF into the frame but it leaves the PDF outside of the frame. Any ideas guys
Thanks
I been trying to solve this problem I've been having which involves inserting a PDF document into a frame. The strange thing about this problem is it works first time around but doesnt on the second time, I've stepped through the code and it executes the snippet of code which inserts the PDF into the frame but it leaves the PDF outside of the frame. Any ideas guys
Code:
Private Sub Form_Load()
Dim A As Long
A = Shell("C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe /A """" " & sFDFPath, vbNormalNoFocus)
Do While wHwnd = 0
DoEvents
wHwnd = FindWindow("AdobeAcrobat", "Adobe Acrobat Professional") 'For Adobe 6.0
Loop
BringWindowToTop wHwnd
Sleep 1000
keybd_event vbKeyF9, 0, 0, 0
keybd_event vbKeyF9, 0, KEYEVENTF_KEYUP, 0
DoEvents
A = SetParent(wHwnd, Frame1.hwnd) <<THIS IS WERE THE PDF SHOULD BE INSERTED INTO THE FRAME
ShowWindow wHwnd, 3
Call CloseMenu
End Sub
Thanks