Add PDF button to toolbar

M

mtpaper

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

Hello -
I have a worksheet set up to print a report as follows:
- I enter a unique ID number into A1
- info in the print area uses vlookup to reflect accurate data

I think print to pdf

The problem is that I have to do this 100 times.... ie, I have 100 people who get this page, with their individual information.

I don't mind entering their numbers, but, I hate that I have to use the mouse for the PDF->Print to PDF portion.

I need a key combination to get me to the window for entering the file name.

Or, ideally, an icon on my toolbar that will get me to: Print to PDF

I tried setting up the keystrokes and writing a script, but it's really more than my brain can handle at the moment.
tell application "Microsoft Excel"
activate
set mySheet to worksheet "Sheet1" of active workbook
set N_ame to the value of cell "A2" of mySheet
tell application "System Events"
keystroke "p" using command down
delay 1
keystroke "p" using {option down, command down}
delay 1
keystroke "d" using command down
delay 1
keystroke "" & N_ame & ""
keystroke return
end tell
end tell

Can anyone out there help me?

Thank you
 
J

Jim Gordon MVP

Hi,

I'm not sure if this will do what you are seeking, but there is an
Automator Action that will do the Save As PDF for you.

Open the Automator application (it's in the applications folder).
There's an automator action called Save Excel Workbooks. You can set it
to always make a PDF.

-Jim
 
M

mtpaper

Hi Jim -
That's helpful, but I'm clueless....

1. I'm in Automator Action, and I don't see anything that says: save Excel Workbooks; nor do I see how to specify that it saves as a pdf

2. I already have a little script that gets me to the Save as Window....

3. How do I expand the script so that the contents of Cell A3 get transferred to the file name?

4. How can I find the Action that you're referring to?

Thank you =
 
M

mtpaper

EDIT: I'm in Excel 2008. I looked at the Microsoft download section of this site, and I see info about Applescript, but no info about how to download additional Applescripts.

Is that what I need?
Where do I find it?
 
J

Jim Gordon MVP

Hi Jim -
That's helpful, but I'm clueless....

1. I'm in Automator Action, and I don't see anything that says: save Excel Workbooks; nor do I see how to specify that it saves as a pdf

2. I already have a little script that gets me to the Save as Window....

3. How do I expand the script so that the contents of Cell A3 get transferred to the file name?

4. How can I find the Action that you're referring to?

Thank you =

Hi,

It sounds like you are still in Excel. Automator is an entirely
different program that ships with MacOSX Leopard. Open Automator by
double-clicking on it in the Applications folder.

When Automator opens click Custom.

Near the top where the Name search field is type Excel
The the list will be narrowed down to those belonging to Excel.

Drag "Save Excel Workbooks" to the right pane, then click the Save
Workbook As button and then change the format to PDF.

That creates the Automator workflow.

Now about the file name....

You may have to figure out how to write an Applescript to accomplish
this task, so the Automator action may not be enough for you.

I'm not a big AppleScripter, but I can at least see in the Excel
AppleScript dictionary that you can use the active cell range property
to determine the contents of a cell. I also see get save as filename and
regular Save, so what you want to do appears to be able to be done in
AppleScript.

-Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top