+ Reply to Thread
Results 1 to 5 of 5

VB Code to Merge 2 pdf in one

  1. #1
    Forum Contributor
    Join Date
    01-31-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    193

    VB Code to Merge 2 pdf in one

    Hello:

    I have 2 pdf in folder C:\TempA\,
    Eaxmple file name : Abc23445443.pdf and xyz5443.pdf

    I need VB Code to merge these 2 pdf in one and put in folder C:\TempB\ as Merged.pdf

    Note:
    The pdf file with the longest name will be 1st and then the other file

    In this case:
    Abc23445443.pdf
    xyz5443.pdf

    Let me know if you have any questions.



    Riz

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VB Code to Merge 2 pdf in one

    Excel can't do this, unless you can reference the library for Adobe Acrobat Professional, which means you have to have it installed.

    There are tools that can merge PDF documents for free, but I am unaware of any that can be called programmatically from Excel.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    01-31-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    193

    Re: VB Code to Merge 2 pdf in one

    Hello:

    I have reference Adobe Acrobet Pro,

    R

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VB Code to Merge 2 pdf in one

    As seen at https://wellsr.com/vba/2017/word/com...adobe-acrobat/

    Set up code to put the two files into an array then call this function with that array, plus the name of the resulting merged file.


    Please Login or Register  to view this content.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: VB Code to Merge 2 pdf in one

    Riz
    Are you still using XL2010 or a later version?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VB Code to merge PDF
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2019, 05:49 PM
  2. Replies: 9
    Last Post: 04-17-2016, 07:34 PM
  3. [SOLVED] VB Code to merge TXT files
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-01-2015, 09:31 PM
  4. [SOLVED] Merge Code
    By Burt_100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2015, 10:53 AM
  5. VB Code to un-merge cells
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2013, 05:39 PM
  6. Merge Code
    By kapeller in forum Excel General
    Replies: 5
    Last Post: 10-21-2011, 09:15 PM
  7. [SOLVED] Merge 2 pieces of code
    By Steph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2006, 12:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1