Generic path for Adobe Reader for form FDF file

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Cosmic (Cosmic_at_discussions.microsoft.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 12:21:05 -0700

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!!!



Relevant Pages

  • Re: IE cant open pdf files
    ... So far I found many questions on the Adobe support group for this, ... .pdf File in Adobe Acrobat Reader ... >>If he clicks on a .pdf file in Windows Explorer it opens ...
    (microsoft.public.windows.inetexplorer.ie6.setup)
  • Re: Scanning a book into PDF?
    ... I've had many beefs with Adobe over the years. ... > Photoshop 7.0 and Acrobat 5.0. ... >> existing pdf file directly on your webpage. ... >> As far as modifying an existing pdf file as someone asked about, Pitstop ...
    (rec.pyrotechnics)
  • Re: Adobe Alternatives
    ... How much trouble would it be to bundle a Foxit exploit in a .pdf file ... Adobe easily maintains over 95% ... Fully patched Adobe Acrobat/Reader with dozens ... Securing Apache Web Server with thawte Digital Certificate ...
    (Security-Basics)
  • Re: Suddenly I cannot open a pdf file?
    ... The date and time was 7/18/2008 6:06 PM, and on a whim, Catt pounded out on the keyboard: ... So I went to Folder Options and sure enough there was no pdf file extension in the list. ... So I put one in and created the association to Adobe 8.1, ...
    (microsoft.public.windowsxp.general)
  • Re: words page size changed by adobe p.s.
    ... Word MVP web site http://word.mvps.org ... Select Acrobat Distiller. ... Re-create the PDF file. ... I'm using adobe acrobat 5.0. ...
    (microsoft.public.word.pagelayout)