Results 1 to 6 of 6
  1. #1
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442

    Combining Documents (DOCX and PDF) into a single document....

    I've built a database creating agendas for meetings allowing the shuffling of priority for each agenda item and each individual under each agenda item.

    So the basic structure is



    Agenda - (1 agenda per month usually)
    Agenda Item - (1 to many relationship with agenda, with an ordering mechanism i.e. 1 to N where N is the maximum number of agenda items)
    Agenda Item Sub Item (1 to many relationship with Agenda Item with a similar ordering mechanism)

    Now, each agenda item and sub item may have one or more documents (.docx or .pdf) attached to it.
    Each one of these documents will have a priority as well. so there may be a document associated with the Agenda Item and 3 documents (mix of .docx and .pdf) associated with each one of the Agenda Item Sub Items.

    What the person currently running the database does each month is do a manual process whereby she combines all the documents associated with the main agenda into a single .pdf document she can distribute to board members.
    The trick is that she spends a lot of time making sure she's combining the documents in the right order even if the agenda gets shuffled around.

    What she's asking for is a way to have my database combine all the documents in the database in the order they appear in the 'current' agenda.

    i.e. if an agenda has 6 agenda items, and each agenda Item has a document (either PDF or .DOCX) and each agenda item has 2 sub items and each sub item has 3 attachments she wants the database to put these together like

    Agenda Item 1 - Document 1
    Agenda Sub Item 1 - Document 1
    Agenda Sub Item 1 - Document 2
    Agenda Sub Item 1 - Document 3
    Agenda Sub Item 2 - Document 1
    Agenda Sub Item 2 - Document 2
    Agenda Sub Item 2 - Document 3
    Agenda Item 2 - Document 1
    ...

    and so on.

    I am loathe to pay for a third party application to make this happen so I thought I'd come here first to see if anyone has had any experience combining .DOCX and PDFs into a single document.
    I can handle the ordering/reordering with no problem, I just haven't had any experience attempting to combine multiple source documents into a single end document.

    The person involved has a full version of adobe acrobat 2017 if that makes a difference. (i.e. invoking a command line to make acrobat do it)
    If there's a way to do this strictly with VBA that's what I would prefer so the database isn't reliant on any external software.

    thanks
    rp

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,980
    I doubt you can combine as you are asking? The header of a file states what it is.?
    Why not make the DOCX files pdf, then merge.?

    I have only done pdf merging/splitting manually, but it should be viable via some program?

    https://www.google.com/search?q=appe...hrome&ie=UTF-8
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,811
    IIRC, there is a dll for Access vba at the Adobe website. You'd include this as a reference on the user pc plus the user requires Adobe (not just Acrobat I believe).
    Can't remember what I used (or tried to use) it for but from what I remember, this won't be a cake walk. Maybe you can find forum threads on using the dll but how to combine documents might be quite the challenge. I think that in most cases, if you can do it manually there's a good chance you can code it. The trick is knowing how.
    HTH
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Since you're a paying adobe customer id investigate that first. If it were me I would convert the docx files to pdf, then simply use command line tools through vba to merge them together in the correct order.

    If acrobat doesn't have something to suite you I use something called pdftk (free) for command line pdf splitting, merging, extracting, watermarking, etc.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,728

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Quote Originally Posted by kd2017 View Post
    Since you're a paying adobe customer id investigate that first. If it were me I would convert the docx files to pdf, then simply use command line tools through vba to merge them together in the correct order.

    If acrobat doesn't have something to suite you I use something called pdftk (free) for command line pdf splitting, merging, extracting, watermarking, etc.
    KD2017: This is exactly the route I was attempting to go, I should be able to, at worst, open the documents in word then do a save as via VBA. Then the chore of combining PDF's should be easier.
    MICRON: those were my thoughts too, usually if there's a menu option to do something I can figure out how to trigger it as well, particularly if it's another MS product. I just didn't know if the tools existed in VBA already or if I'd have to find an additional (installed) component.
    ORANGE: hello! and thanks for the welcome. I'll take a look at your links.

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

Similar Threads

  1. Combining Fields Into Single Text Box
    By MaxQTime in forum Reports
    Replies: 6
    Last Post: 07-26-2019, 08:20 AM
  2. Replies: 1
    Last Post: 05-09-2019, 05:47 AM
  3. Replies: 5
    Last Post: 10-28-2013, 08:09 AM
  4. Export single records to new Word Document
    By karmaimages in forum Import/Export Data
    Replies: 0
    Last Post: 11-19-2009, 03:37 PM
  5. combining fields into a single list
    By rich in forum Queries
    Replies: 4
    Last Post: 02-23-2009, 06:41 AM

Posting Permissions

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