VBA to create PDF from webpage
I did a bit of googling on the problem, but so far, I haven't found anything substanial, so hopefully someone here can help me.
My group at work produces a number of reports using Excel and SQLServer each day. With most of these reports, we use the PDF distiller via VBA to print each report, then attach the resulting file in an email.
On one report, it has evolved into becoming a bit of a guide and is over 20 pages now. As such, the recipients requested that we add some clickable links in the table of contents to make jumping to the apporiate section easier. I have accomplished this by the following:
1) The table of contents is on a seperate sheet in the excel file. The names of each section have a hyperlink to the PDF files that we generate for each section. I save this sheet as an htm file.
2) Each of the reports is printed using the distiller into a seperate PDF document, tha the table of contents has a link to.
3) I open Adobe Acrobat and click "Create file from web," select the Table of contents htm file, select "Acquire entire webpage," and it creates the entire 20+ page report, complete with active hyperlinks in the table of contents that jump the user directly to the report they want.
4) I then save this file and exit Adobe Acrobat.
5) I go back into my Excel file and run a macro that attaches the combined PDF file to an email.
What I would like to do is to program, via VBA, the whole "Create from website" part so that the whole thing is done automatically.
Anyone every attempt something like this?
I looked online to see if I could find some documentation on programming Adobe, even called their tech support line (who is not very helpful when it comes to programmically using their product), but no luck so far.