My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
Posts: 1 Joined: 30-July 19 ![]() | I'm using the Shell command to open a PDF in Foxit. (Acrobat doesn't fully support opening a PDF to a given page via command line.) The PDF opens correctly to the right page. The problem is that Foxit ignores the "NoFocus" option. As a workaround, I added the additional line to activate Access. This works 90% of the time - unless the user happened to press a keystroke during the moment that Foxit had the focus. Then the focus gets stuck on the Foxit app. I tried using a timer event to check if Foxit still had focus and switch it back to Access, but once a key has been pressed in Foxit, the AppActivate command won't return the focus to Access. Can anyone suggest a more foolproof way to open the PDF without giving it the opportunity to grab the focus? Thank you, Evan CODE str = "C:\FoxitPhantomPDF.exe C:\MyDocument.pdf /A page=22" X = Shell(str, vbNormalNoFocus) AppActivate "Access", False This post has been edited by EvanScamman: Aug 17 2019, 10:14 AM |
![]() Post#2 | |
![]() UA Moderator Posts: 76,889 Joined: 19-June 07 From: SunnySandyEggo ![]() | -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 12th December 2019 - 09:17 PM |