Solved

Excel to PDF converter (using VBA)

Posted on 2007-03-18
4
977 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 250 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

An article on effective troubleshooting
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

751 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