Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel to PDF converter (using VBA)

Posted on 2007-03-18
4
Medium Priority
?
981 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 45

Accepted Solution

by:
patrickab earned 1000 total points
ID: 18747187
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
ID: 19428625
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
ID: 20294398
Forced accept.

Computer101
EE Admin
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

704 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