Merge Pdf With Excel

Upload the PDF files you want to merge. Sort your files by dragging and putting them in the order you want them to be merged in. Sort all documents ascending or descending by using the respective buttons (optional). Click on 'Save' to open the saving options and again on 'Save' to get your merged document. Combine Sheets in Excel Files With the Move or Copy Option. Select a spreadsheet file to copy the sheet to from the To book drop-down menu. Click the Create a copy check box to copy the selected sheet. If you don’t select that option, the sheet moves from one spreadsheet to the other. Press the OK button to close the window.

  • Convert PDF files to Excel by uploading them below. Get Premium to go unlimited and ad free. Drag files here to upload. Ensure that all the PDF files that you want to convert are listed below. The maximum number of simultanous pages for OCR is 50. Every operation counts and helps us plant a tree!
  • Easy and powerful PDF to Excel converter. Our user-friendly web interface makes converting PDF to Excel spreadsheets a breeze. Our File table is designed to make it easy to convert multiple files in batch processing and our OCR engine can handle scanned PDF files.

Merge Pdf With Excel Pdf

Active21 days ago

I am trying to combine PDF's into one single pdf with the use of vba.I would like to not use a plug in tool and have tried with acrobat api below.

I have tried something like, but cannot seem to get it to work. I get no error msg but perhaps I am missing parts.

Any help would be appreciated.

new code:

New Code:

excelguy
excelguyexcelguy

4 Answers

You need to have adobe acrobat installed / operational.

I used this resource re method references

EDIT: Swapping the array for auto generated (mostly, the primary pdf still set by user) list of pathways to pdfs that you want to insert into the primary pdf)

You can use something like below to generate the collection of documents to be inserted into your primary doc. The first file in the collection would be the file that you are inserting into, same as in first example. Then assign the folder pathway of the folder with the pdf files that you would like to see inserted into your primary doc to inputDirectoryToScanForFile. The loop in this code will add the pathway of every pdf file in that folder to your collection. These are the pathways later used in the adobe API calls to insert pdf into your primary.

Code that takes a primary file and inserts other pdfs into that file:

learnAsWeGolearnAsWeGo
2,0462 gold badges3 silver badges18 bronze badges

This is my understanding of your question:

Requirements:

• Combined a series of pdf files, located in the same folder of the workbook containing the procedure

• Pdf files names go from firstpdf1.pdf to firstpdfn.pdf where n is the total number of files to be combined

Let’s review your original code:

• All variables should be declared:

• This line is missing the path separator ':

It should be PDFfileName = Dir(ThisWorkbook.Path & ' & 'firstpdf' & n & '.pdf')

• Therefore this line always returns ' (no pdf file was found in the ThisWorkbook.Path):

If PDFfileName <> ' Then

Additionally:

• These lines would have returned: Error - 424 Object required as the objects objCAcroPDDocSource and objCAcroPDDocDestination were not initialized:

objCAcroPDDocSource.Open ThisWorkbook.Path & 'pathwithpdfs' & PDFfileName

If objCAcroPDDocDestination.InsertPages(objCAcroPDDocDestination.GetNumPages - 1, objCAcroPDDocSource, 0, objCAcroPDDocSource.GetNumPages, 0) Then

objCAcroPDDocSource.Close

• The objCAcroPDDocDestination was never opened.

Solutions:These procedures use the Adobe Acrobat Library

Adobe Acrobat Library - Early bound

To create the Vb Reference to the Adobe Library in the VBA Editor menu click Tools`Referencesthen select theAdobe Acrobat Libraryin the dialog window then press theOK` button.

Adobe Acrobat Library - Late bound

No need to create the Vb Reference to the Adobe Library

Mail merge pdf with excelEEMEEM
4,8411 gold badge12 silver badges31 bronze badges

The below code i got from stack overflow this will list all sub folders in a folder.

Excel

This Code will Combine all PDF files in sub-folder and stores the output in chosen destination folder

Pdf Mail Merge From Excel

'SORTING--------------------------------------------------------

'ZVI:2013-08-27 http://www.vbaexpress.com/forum/showthread.php?47310-Need-code-to-merge-PDF-files-in-a-folder-using-adobe-acrobat-X' Reference required: VBE - Tools - References - Acrobat

Jagadish N PJagadish N P

I don't have a exact soluation for your problem, however, I had a similar one, namely that I wanted to add fields to a pdf from VBA.

Merge

I can tell you that Adobe has a JavaScript API which you can control through vba.

Here is the link to the APIhttps://www.adobe.com/devnet/acrobat/javascript.html

And this is a part of the code I used in VBA to control fields in the PDFs.

You should probably look at the insertPages method in the API.

What is als possible is using the build in reference from VBA to Acrobat. However, I found it very limited and I did not work with it. There are only a few objects available, here are some examples:

FrankstaFranksta

protected by ZoeSep 7 at 15:35

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged excelexcel-vba or ask your own question.

You can combine data from multiple cells into a single cell using the Ampersand symbol (&) or the CONCAT function.

Combine data with the Ampersand symbol (&)

  1. Select the cell where you want to put the combined data.

  2. Type = and select the first cell you want to combine.

  3. Type & and use quotation marks with a space enclosed.

  4. Select the next cell you want to combine and press enter. An example formula might be =A2&' '&B2.

Combine data using the CONCAT function

  1. Select the cell where you want to put the combined data.

  2. Type =CONCAT(.

  3. Select the cell you want to combine first.

    Use commas to separate the cells you are combining and use quotation marks to add spaces, commas, or other text.

  4. Close the formula with a parenthesis and press Enter. An example formula might be =CONCAT(A2, ' Family').

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

Merge Pdf Into Excel

See Also