Including other documents when Exporting/Printing in Excel

Jason 0 Reputation points
2025-08-14T23:09:03.3633333+00:00

I have an Excel form with an "output" sheet that compiles the information entered - this is intentionally not using mailmerge, and each time this form is used, it is a fresh copy of the document by necessity. Once the form is complete, the user will export/print to pdf the output sheet, then combine that pdf with other Word or pdf documents, and then send it.

These other documents are not always the same files, but will always be Word or PDF files - if it simplifies things, I could convert everything into either format.

In my dream, I could include these outside documents in the initial export using a column of dropdown lists or checkboxes etc. The user would go down the list and select the documents they need, then just hit print/export and everything would come out together.

I would also be happy with files being pre-selected based on cell values, where certain documents are automatically included.

I have limited knowledge of Macros, but my initial feeling is that due to embedded objects only containing the first page (and seem to reduce quality), I would need to:

  1. Break up my external documents into single pages
  2. Embed each page individually onto worksheets
  3. Create a check of some sort on which sheets/pages should print
  4. Include these in a new print area

My question is:

  1. Is this achievable with VBA or other tools, in a less primitive way than I am envisioning?
  2. Bonus Is there a way for the user to determine which order everything would print in?

Any advice would be greatly appreciated, thanks for your time!

Microsoft 365 and Office | Excel | For business | Android
{count} votes

1 answer

Sort by: Most helpful
  1. Gabriel-N 4,570 Reputation points Microsoft External Staff Moderator
    2025-08-15T04:57:11.74+00:00

    Hi Jason

    Thank you again for your inquiry about automating your document process in Excel.

    After reviewing your goal, here’s the proposed solution. Please note that Excel’s built-in tools can’t merge multiple PDFs into one without external software. However, we can automate everything else such as selection, conversion, and organization, saving you significant time and effort.

    Important: All these steps work on the Excel desktop app for Windows. Since you selected the tag “Excel for Android,” I regret to say that VBA cannot run in a mobile environment.

    Step 1: Make Your Selections

    We’ll add a simple sheet called Document Options to your Excel file. This sheet will let you:

    • Choose files: Select “Yes” for each document you want to include.
    • Set the order: Enter numbers (1, 2, 3…) to define the sequence for the final output.

    Step 2: Click “Create Documents”

    On your main form, you’ll have a macro. Once your selections are ready, click this macro to start the process.

    Step 3: Automation in Action

    Behind the scenes, the script will:

    • Prompt you to choose a destination folder.
    • Export your main Excel sheet as a PDF.
    • Convert selected Word files to PDF.
    • Copy any existing PDFs you selected.

    Step 4: Organized Output

    In moments, you’ll have all files in your chosen folder, named sequentially for easy use (e.g., 01_MainReport.pdf, 02_Terms.pdf, 03_Appendix.pdf). You can then email, print, or review them in the correct order.

    This approach eliminates manual steps and ensures consistency. If this meets your requirements, please let me know, I’ll provide the full VBA code and a detailed setup guide.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.