themanof83
Registered User.
- Local time
- Today, 07:07
- Joined
- May 1, 2008
- Messages
- 73
Afternoon All!
I have a function (activated through a Command Button) that opens up a PDF, copies the contents then tries to paste this into a field on the form. I am having trouble getting the function to return correctly to the open Access Application and hence the correct form field.
Ive tried the AppActivate statement (using "Microsoft Access" and "Microsoft Office Access" as the arguements) but it throws up a reference error.
I've also tried Access.Application.Visible = True, again with no luck.
Any ideas on how to return to Access???
I have a function (activated through a Command Button) that opens up a PDF, copies the contents then tries to paste this into a field on the form. I am having trouble getting the function to return correctly to the open Access Application and hence the correct form field.
Ive tried the AppActivate statement (using "Microsoft Access" and "Microsoft Office Access" as the arguements) but it throws up a reference error.
I've also tried Access.Application.Visible = True, again with no luck.
Any ideas on how to return to Access???
Code:
'Get PDF path, open PDF and copy text
strCurPDF = GetFolderSpec & Me.QTGTest & ".pdf"
Call OpenPDFDocument(strCurPDF, True)
Wait_timer (3)
'Return to access
!!!!!!!!!!!!
'Set Focus to Field
Forms!QTG!PDFPass.SetFocus
Wait_timer (1)
SendKeys "^(v)" 'Ctrl-V (Paste)
Wait_timer (1)