473,395 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MacOSX Excel: how to print to pdf through VBA

3
Hi!

Can you help with the following problem:
How to automate in Excel through VBA that a page is printed to PDF (=saved as PDF)
...this all in MacOSX

(Windows would need a PDF creator program). On a mac I can manually go to file->print and select "PDF" and save it as a PDF, now I would like this to happen with a VBA code.
...been stuck with this for 2 weeks already...

thanx
Sep 4 '09 #1
3 2508
Have you looked at PDFTK. I am currently using it (PC though), but it supports Mac installation too. Free, and 1 line of code to convert, print, blah blah blah, check it out.
Sep 4 '09 #2
Nixu
3
Am lookng at PDFTK now,thx...but don't think that is my solution. This is what I am doing:
I have a personnel register in exel and I am calculating all the salaries there too. I want to make a PDF from the salarycalculation (this is what I will print to paper/ e-mail to the employees and save in a separate location on my harddisk).
At this time I have to manually save the calculation as PDF with every employee. It is a bit frustrating having to manually click print->PDF->save as and then write "Salarycalculation John Smith Sep 2009" with every employee and this surely can be done through VBA.
Sep 4 '09 #3
Nixu
3
Maybe this makes my question clearer:

I need a code in VBA that makes the following:
when I press a CommandButton (named CommanButton1) on a Userform the range (Sheet1!A1:E28) is saved as PDF (=printed as PDF).
This under MacOSX


Private Sub CommandButton1_Click()
' this code saves a range as PDF

End Sub
Sep 4 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Klefevre | last post by:
Hi, I was wondering why the code below does not work in ASP. Why does the printout method not work? Tx, Kurt Dim m_strPrinterDeviceName Dim m_objExcelApplication, m_objExcelWorkBook,...
3
by: john Hoffman | last post by:
Hello, I am using automation in C# with an Excel spreadsheet. All is well until I try to print to a printer other than the default one. I use a C# print dialog to return me the printer name to...
0
by: freekamel | last post by:
I try to print via interop.excel I have no problem since when i change the landscape property. The system gives me un unswer that is not able to change the property because there's not a printer...
2
by: Balamurali C | last post by:
Hi All I'm having one problem, since im debuging this last one week I'm not able to do. Problem: In my webage I have two Frames(top & bottom) in the top frame I'm displaying some...
0
by: dan84 | last post by:
I write my code : #inizializzazioni varie che tralascio #mi connetto al mio db mysql e recupero i dati che volgio inserire nel file excel conn = MySQLdb.connect(host = "XXX", port = XXX, user...
1
samycbe
by: samycbe | last post by:
Hi Friends, I am giving my output in excel to the user. but the user's requirment is directly the print dialouge box of the excel should be poped up in excel. please help me in this issue samy
4
by: JaxDawg | last post by:
I have a spreadsheet saved as an XML spreadsheet so I can manipulate it easier (and don't need COM). When I'm done, I want to display to the user. Currently, I'm using simple JavaScript in my PHP...
1
by: =?Utf-8?B?VFc=?= | last post by:
In my worksheet, whenever i try to print 2 or more pages i receive an error that says PCL XL ERROR SUBSYSTEM:KERNAL ERROR: ILLEGALOPERATORSEQUENCE OPERATOR: ENDCHAR POSITION: 23 Does anyone...
0
by: JRough | last post by:
I have the following code at the end of a page that lists some query results. It starts in a form that asks the user for input, one of two template pages. One template is a form for user input if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.