Solved

Excel to PDF converter (using VBA)

Posted on 2007-03-18
4
969 Views
Last Modified: 2009-12-16
I would like to create a PDF from Excel VBA.
a)The PDF should have same colors as the charts in the original excel and
b) should also retain the hyper links in the original excel
0
Comment
Question by:SVKUNTE
4 Comments
 
LVL 45

Accepted Solution

by:
patrickab earned 250 total points
Comment Utility
SVKUNTE,

VBA does not contain an Excel to PDF converter. You perhaps could invoke an Excel to PDF converter from a VBA routine but that's about all you can do. If VBA did contain such a facility there would be no need for stand-alone PDF applications such as 'EzeePDF' and many others around. You can get a free copy of 'EzeePDF' from:

http://www.softpedia.com/get/Office-tools/PDF/Simple-PDF-Editor-Pro.shtml

Hope that helps

Patrick
0
 
LVL 1

Expert Comment

by:MWNZ
Comment Utility
There are free PDF printing solutions out there using, e.g. Ghostscript.  Once you have created a pdf printer, you would simply issue the print command from within your VBA and point it to the pdf printer.  See http://pad.olsonnetwork.com/faqs/MakePDF_HOWTO_Images.html
I am using a redmon/ghoscript GPL 8.56 combination and confirm that hyperlinks are clickable in the resultant pdf and the resultant file is in colour (same as in the original excel sheet).  I did not need to use the PDFWriter application as I use the in-built pdfwriter device in ghostscript.  I also installed the adobe postscript drivers and used the distiller ppd file (available from adobe).
0
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Forced accept.

Computer101
EE Admin
0

Featured Post

The curse of the end user strikes again      

You’ve updated all your end user’s email signatures. Hooray! But guess what? They’re playing around with the HTML, adding stupid taglines and ruining the imagery. Find out how you can save your signatures from end users today.

Join & Write a Comment

Suggested Solutions

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now