![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Dear reader, The following VBA instruction opens a file. Application.FollowHyperlink X:\.............\FileName.Extension Only in case the extension is pdf than the file opens and immediately the file is closing. Is there any one who knows way the extension PDF will not stay open as all other extension will do. Kind regards, Simon Don't know. You could copy the code at |
#3
| |||
| |||
|
|
Dear reader, The following VBA instruction opens a file. Application.FollowHyperlink X:\.............\FileName.Extension Only in case the extension is pdf than the file opens and immediately the file is closing. Is there any one who knows way the extension PDF will not stay open as all other extension will do. Kind regards, Simon |
#4
| |||
| |||
|
|
Simon van Beek wrote: Dear reader, The following VBA instruction opens a file. Application.FollowHyperlink X:\.............\FileName.Extension Only in case the extension is pdf than the file opens and immediately the file is closing. Is there any one who knows way the extension PDF will not stay open as all other extension will do. Don't know. You could copy the code at http://www.mvps.org/access/api/api0018.htm into a module and do something like ? fHandleFile("C:\filename.pdf",3) |
#5
| |||
| |||
|
|
Salad <salad (AT) oilandvinegar (DOT) com> wrote in news:gZKdna1SAqG2F97RnZ2dnUVZ_qadnZ2d (AT) earthlink (DOT) com: Simon van Beek wrote: Dear reader, The following VBA instruction opens a file. Application.FollowHyperlink X:\.............\FileName.Extension Only in case the extension is pdf than the file opens and immediately the file is closing. Is there any one who knows way the extension PDF will not stay open as all other extension will do. Don't know. You could copy the code at http://www.mvps.org/access/api/api0018.htm into a module and do something like ? fHandleFile("C:\filename.pdf",3) Does the ShellExecute API behave differently from Application.FollowHyperlink? I always thought the latter was just a very thin wrapper around the former. |
#6
| |||
| |||
|
|
Dear reader, The following VBA instruction opens a file. Application.FollowHyperlink X:\.............\FileName.Extension Only in case the extension is pdf than the file opens and immediately the file is closing. Is there any one who knows way the extension PDF will not stay open as all other extension will do. Kind regards, Simon |
#7
| |||
| |||
|
|
David W. Fenton wrote: Does the ShellExecute API behave differently from Application.FollowHyperlink? I always thought the latter was just a very thin wrapper around the former. I got the same deal as the OP with a PDF. Using FollowHyperlink,even specifying open in new window, it would open and then be minimized. Not with a .txt file or .doc as they'd open restored. |
|
With the function I provided from MVPS you can specify how you want the file opened. And it handles PDFs just fine. |
#8
| |||
| |||
|
|
Application.FollowHyperlink X:\.............\FileName.Extension Only in case the extension is pdf than the file opens and immediately the file is closing. |
#9
| |||
| |||
|
|
Salad <sa... (AT) oilandvinegar (DOT) com> wrote innews:6dadnRYfZZM3LdnRnZ2dnUVZ_hadnZ2d (AT) earthlink (DOT) com: David W. Fenton wrote: Does the ShellExecute API behave differently from Application.FollowHyperlink? I always thought the latter was just a very thin wrapper around the former. I got the same deal as the OP with a PDF. *Using FollowHyperlink,even specifying open in new window, it would open and then be minimized. *Not with a .txt file or .doc as they'd open restored. I don't see this. Mayber there are differences in versions of Adobe Reader? With the function I provided from MVPS you can specify how you want the file opened. *And it handles PDFs just fine. Yes. The ShellExecute API allows you to specify window mode, so if that's a problem with Application.FollowHyperlink, that's a big plus. Has anyone tried alternatives to Adobe Reader, like Foxit? I haven't, but have been tempted. -- David W. Fenton * * * * * * * * *http://www.dfenton.com/ usenet at dfenton dot com * *http://www.dfenton.com/DFA/ |
#10
| |||
| |||
|
|
I've been using Foxit for PDFs for a couple of years now. It's much quicker than Adobe and has worked fine for me with PDFs in Access. |
![]() |
| Thread Tools | |
| Display Modes | |
| |