Results 1 to 2 of 2

Thread: PDF and Access

  1. #1
    Join Date
    Oct 2013

    Unanswered: PDF and Access

    MS Access 2010. I am trying to open a PDF template file from a current record edit the record and save the new pdf file back to that record. Any help would be greatly appreciated.

  2. #2
    Join Date
    Oct 2013

    Best solution so far

    I have been able to find the following code to help with pdf to access. It involves batch exporting the PDF to an excel file and then us the following code to automatically insert into access table. It has the ability to delete the excel database to help in importing duplicates.

    Dim strPathFile As String, strFile As String, strPath As String
    Dim strTable As String
    Dim blnHasFieldNames As Boolean

    ' Change this next line to True if the first row in EXCEL worksheet
    ' has field names
    blnHasFieldNames = False

    ' Replace C:\Documents\ with the real path to the folder that
    ' contains the EXCEL files
    strPath = "C:\Documents\"

    ' Replace tablename with the real name of the table into which
    ' the data are to be imported
    strTable = "tablename"

    strFile = Dir(strPath & "*.xls")
    Do While Len(strFile) > 0
    strPathFile = strPath & strFile
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
    strTable, strPathFile, blnHasFieldNames

    ' Uncomment out the next code step if you want to delete the
    ' EXCEL file after it's been imported
    ' Kill strPathFile

    strFile = Dir()

    Thanks Ken Snell for the code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts