Re: Generic path for Adobe Reader for form FDF file
From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 09/10/04
- Next message: Fuzzy Logic: "Re: Newbiew question...PLEASE HELP"
- Previous message: PRC-Phil: "RE: Label problem in A2003?"
- In reply to: Cosmic: "Generic path for Adobe Reader for form FDF file"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Sep 2004 16:34:49 -0400
Try using the ShellExecute API: all it needs is the full path to the PDF
file, and it will open it in whatever application is registered for the .PDF
extension.
See http://www.mvps.org/access/api/api0018.htm at "The Access Web" for
sample code.
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Cosmic" <Cosmic@discussions.microsoft.com> wrote in message news:4E5372B8-88F0-45D1-B365-8AB3CBA9C38A@microsoft.com... > I'm using Adobe fdf forms to populate a pdf file with information from my > database. I currently got the software to work if I hard code the Adobe path > and pdf file path, but I would like the program to handle the paths in a more > generic fashion. > How do I use the default Adobe Reader that the user has installed? > How do I use a generic path depending on where the database is installed on > the user machine? > Here is part of the code: > Set fs = CreateObject("Scripting.FileSystemObject") > Set a = fs.CreateTextFile("c:\MyDatabase\FDFforms\MyFDF.fdf", True) > a.WriteLine ("%FDF-1.2") > 'FUTURE Location of PDF file is hardcoded, should make it more dynamic > later!!! > a.WriteLine ("1 0 obj<</FDF << /F(C:/MyDatabase/OtherForms/MyPDF.pdf)") > 'More fdf stuff here... > a.WriteLine ("endobj") > a.WriteLine ("trailer") > a.WriteLine ("<</Root 1 0 R>>") > a.WriteLine ("%%EOF") > a.Close > 'Call Acrobat reader with the new file name > 'NOTE: Need a generic location for Acrobat since it may not be in this > location. > stAppName = "C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe > c:\MyDatabase\FDFforms\MyFDF.fdf" > Call Shell(stAppName, 1) 'This only works with the full path to the > application > > > BTW: I have gotten EXCELLENT responses from previous questions. I really > appreicate the support!!!
- Next message: Fuzzy Logic: "Re: Newbiew question...PLEASE HELP"
- Previous message: PRC-Phil: "RE: Label problem in A2003?"
- In reply to: Cosmic: "Generic path for Adobe Reader for form FDF file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|