Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Print a Web Page as PDF using Hyperlink in Excel 2007?

Status
Not open for further replies.

James312

Technical User
Mar 12, 2012
2
I'm using Excel 2007 and PDF Converter 6 Professional Software (Nuance). One of my Excel Columns is a list of 50+ Hyperlinks that go to external web site pages of online retailers. While I'm new to VBA, I've been able to write the necessary VBA code to loop through the 50+ Hyperlinks, download several fields (name of retailer, item name, price of item, etc.), import those fields directly into Excel, then loop to the next hyperlink on down the column. This macro works fine. MY CHALLENGE: I also need to save the actual web site page as a PDF file. I need assistance in writing CODE for a macro that will open a web page (based on a hyperlink in Excel), select a printer driver (PDF Converter is the printer driver), print that web page to a file with a unique name in a folder name I can designate, then finally close that web page. The looping part of the Code is complete. My PDF Converter Software allows me to come back later and assemble all these 1 page PDF files into one larger document.

I am able to create a PDF file of the web page manually using the PDF Converter Software (add-in to Excel) by simply selecting PRINT, then selecting 'PDF Converter' as my 'Printer Driver'. I've attempted to 'Record a Macro' & watch the Code being generated, but as I perform the manual key stokes in the newly opened window once the hyperlink is activated and the web page opens, no Code is generated. I've gone through dozens of FAQs on the Tek-Tips web site, but other FAQs are related to printing Excel worksheets as PDFs rather than following a hyperlink and printing the resulting open web page as a PDF file. Your expertise & kind assistance in suggesting VBA code to utilize... or ... thread to this specific topic ... or...other guidance would be sincerely appreciated.
 
Thanks, madonnac, for the help! This CODE work properly and prints the designated web page as a PDF. I'm continuing to modify for my application as I also need to archive these PDF files for later reference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top