Merging 2 PDF files using WIN2PDF (1 Viewer)

aziz rasul

Active member
Local time
Today, 10:49
Joined
Jun 26, 2000
Messages
1,935
Does anyone have any code that will merges 2 pdf files creating using WIN2PDF?

I have the following 2 files:-

Code:
    SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFFileName", "L:\Renewals workbook\ABC Limited - Renewal - 2018.05.18.pdf"

    SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFPrependFile", "L:\Renewals workbook\COOPERVISIONMP-APRIL2018v1.pdf"

I just need some code here that will merge them?
 

Ranman256

Well-known member
Local time
Today, 06:49
Joined
Apr 9, 2015
Messages
4,339
youd make code to control Win2Pdf, then run the append function, then save.

Since I do not have that app, it would look something like:

you would add the WIN2PDF object to VBE using :
alt-F11, menu, tools , references, WIN2PDF object library

then the code would be similar to,

Code:
Dim obj As New WIN2PDF

vFile1 = "L:\Renewals workbook\ABC Limited - Renewal - 2018.05.18.pdf"
vFile2 = "L:\Renewals workbook\COOPERVISIONMP-APRIL2018v1.pdf"
vFile3 = "L:\final.pdf"

obj.Open vFile1
obj.Document.Append vFile2
obj.Document.SaveAs vFile3
obj.quit

Set obj = Nothing

someone who uses it would have better code.
 

aziz rasul

Active member
Local time
Today, 10:49
Joined
Jun 26, 2000
Messages
1,935
Unfortunately it doesn't recognise

Code:
Dim obj As New WIN2PDF
 

Ranman256

Well-known member
Local time
Today, 06:49
Joined
Apr 9, 2015
Messages
4,339
It has to be in the REFERENCES, in VBE.
I don't know what it's called.
 

aziz rasul

Active member
Local time
Today, 10:49
Joined
Jun 26, 2000
Messages
1,935
It's not called win2pdf as it's not on the list. Will investigate further on Monday.
 

Users who are viewing this thread

Top Bottom