Download PDF from website and add to PDF made from different excel sheets

Cyfer

New Member
Joined
Jun 27, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi

I'm using a macro to generate a PDF. I was wondering if and how to add a downloaded pdf (from URL) and add it to the array below.

Reason I want this is because I want the end to not to add the PDF as and extra document but have all in one PDF.

Thanks

VBA Code:
Sub Save_as_pdf()

Dim FSO As Object

Dim s(1) As String

Dim sNewFilePath As String



Set FSO = CreateObject("Scripting.FileSystemObject")

s(0) = ThisWorkbook.FullName

ThisWorkbook.Sheets(Array("sheet1", "sheet2", "sheet3", "sheet4")).Select

ActiveSheet.ExportAsFixedFormat _

Type:=xlTypePDF, _

Filename:="examplefile " & Date & ".pdf", Quality:= _

xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:= _

False, OpenAfterPublish:=True

End Sub
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
You could use a tool like PDFtk Server to merge the two PDFs into one PDF.

Here is example code which would need modifying for your case:
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top