Results 1 to 10 of 10

Combine SharePoint Online PDFs from Access Query Result

  1. #1
    Eric Curran is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    5

    Cool Combine SharePoint Online PDFs from Access Query Result

    Hello folks,

    I have an Access query that returns a subset of records from a SharePoint document library, each including the URL of a related PDF.

    Is it possible to leverage that query to combine the resulting PDFS into one large PDF?



    Ideally I’d like to include two related Access reports upfront as well, but I’ll take baby steps.

    Any guidance would be appreciated.

    Thank you.

    Eric

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    47,885
    Yes, VBA can manipulate PDF files to combine. Requires an install of Adobe Acrobat (not the Reader). Review https://www.accessforums.net/showthread.php?t=25574.

    There may be 3rd-party apps that accomplish.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Eric Curran is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    5
    Thank you. Will look into it. Do you think that can be sourced from a query (as opposed to every file in a folder)?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    47,885
    Yes, file paths could be pulled from query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Eric Curran is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    5
    I guess the difference between what I'm doing and the example in the link is that my files are not broken down by folder. They'll all be in the same folder. I was hoping to filter the resulting PDFs based on a "claim number" field in the query. Appreciate the response and am looking into that code, regardless.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    47,885
    The example code does combine files located in same folder, it just also cycles through a bunch of folders to merge files. Modify code as appropriate.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Eric Curran is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    5
    Forgive my ignorance;


    I'm assuming that I need to paste this code into a module, and then call that module from the query?


    As far as customizing the code, I assume I change the following URL to be the URL of the SharePoint document Library I'm referencing.
    Set SourceFolder = fso.GetFolder("R:\Projects\LabReportsOLD")


    But then I'm a bit at a loss. It seems like the code is looking for a specific sub-folder, as the code states:
    If SSFolder.Name <> "Soils & Aggregate" Then


    Since I'm looking to match a field in the SharePoint, do I change this line to something like?:
    If Requests.Claim Number=[Form.Claim Number] Then

    Thanks for your patience while I work through this. I'm obviously not an expert.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    47,885
    The example code will not work as is for your situation. It provides an example of using Adobe objects in VBA but is not generic. Yes, it treats folders/files differently depending on content because that was my specific requirement, hence the conditional statements. Will have to write code tailored to your db. Take what you need and discard what you don't. Code could be behind a form if you prefer.

    I have no idea if referencing a SharePoint library will work.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Eric Curran is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    5
    Thanks. Will keep plugging away.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    47,885
    And no, code would not be called from a query. It could be called from a button click event.

    Code could open a recordset object that has folder path and loop through recordset to grab folder path for use in merge code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. SharePoint Online and Access Services End of Life
    By smithliam270 in forum Access
    Replies: 0
    Last Post: 10-11-2017, 03:37 PM
  2. Exporting MS Access 2016 tables as Sharepoint Online List
    By Rykimaruh in forum Import/Export Data
    Replies: 0
    Last Post: 09-16-2017, 11:57 PM
  3. Replies: 2
    Last Post: 04-19-2016, 04:09 PM
  4. Replies: 0
    Last Post: 04-08-2016, 05:50 AM
  5. Replies: 0
    Last Post: 03-05-2012, 01:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums