VBA to combine multiple PDF Pages - VBA PDF Automation-7

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
right in this episode we're going to quickly learn how to combine multiple PDF files into one we'll start again by writing a new sub procedure over colt is combine PDF files will call this team yeah I have to and from document and then we'll just set up our application just copying from the fire codes this part is fine this will be our be the Portable Document instead of the viewer now we'll to say sure we'll just sorta document for now I'm gonna show you a sample of the PDF that we're gonna combine I have a sample procured here start opening out our document here is a sample this this is a sample PDF that I've created it has five pages we'll try to learn how to insert between each of these pages that's why I just have the numbers in the pages quickly take the pod this particular PDF again is a sample it has two pages we have opened up the document now that is indexed to ensure the pages is so will say to document that here you'll have to mention the number of the page you want to insert after so here we'll say we want to insert it after the the second page the the count start from zero is a one okay and then this will be the source or from document now the start page will be zero and we can say we want to insert also or to say get all the pages and if you want to include all the flags on the bookmark within the PDF with posts that district true otherwise it should be okay we'll see if it is false then we want to say oops fail to insert the page okay now we want to save this document and then we'll do a PD save all file again and this will be the name of the part where we want to save part we'll just call this part output dot PDF able to see otherwise we'll say so I think that's pretty much it will close two documents here no we exit an app so we can give it a shot once discord runs we're expecting that it'll be inserted the second document which is at sample two pages within this PDF document will be inserted to these pages file after the second page starting from 0 1 1 means it's two pages so it will be inserted in the third page I'm gonna give it a run once we run this we'll see the merge merge output dot PDF see it's document saved so it's like it worked here's the output we make this smaller as you can see here it is inserted after the second page now if we mention okay insert it after the first page run again this time we'll call this as one boy has been see it so after the first page you see he does save all the pages okay so this is very simple this is how you can use this particular insert beats method to add pages to to your document what you can try is you can replicate the same thing if you have Tarte document that you want the insert within here you can just replicate this index and this the file here this will be your tart file reference that you need to update and if you have to look through and do this for multiple of them what you can do you can combine you can create these two function and you can have you know like arguments with file1 file2 and so on and then it will keep on inserting if you need more help around this feel free to comment on the video below in the next video we'll learn how to delete the PDF
Info
Channel: VBA A2Z
Views: 24,584
Rating: undefined out of 5
Keywords: single pdf to merge multiple pdf, how to merge pdf, how to combine pdf, single pdf to marge multiple pdf, how to marge pdf, VBA to combine multiple PDF Pages, without acrobat, pdf automation
Id: 2GjPjc-Jtvs
Channel Id: undefined
Length: 7min 46sec (466 seconds)
Published: Thu Jan 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.