From: Simon van Beek on 18 Jul 2010 16:44 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
From: Salad on 18 Jul 2010 19:11 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. > > Kind regards, > > Simon > > 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)
From: paii, Ron on 19 Jul 2010 10:57 "Simon van Beek" <SvanBeekNL(a)hotmail.com> wrote in message news:4c436797$0$7662$bf4948fe(a)news.tele2.nl... > 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 > > It may be a Windows issue and not Access. I use the same code to open files, including PDF.
From: David W. Fenton on 19 Jul 2010 14:19 Salad <salad(a)oilandvinegar.com> wrote in news:gZKdna1SAqG2F97RnZ2dnUVZ_qadnZ2d(a)earthlink.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. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
From: Salad on 19 Jul 2010 16:08 David W. Fenton wrote: > Salad <salad(a)oilandvinegar.com> wrote in > news:gZKdna1SAqG2F97RnZ2dnUVZ_qadnZ2d(a)earthlink.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. > 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.
|
Next
|
Last
Pages: 1 2 3 Prev: Update Query Problem Next: Headers In Multiple Column Reports - And Hiding On No data |