Page Setup defaults

N

nandor

Greetings.

I believe this was also not possible (or at least not obvious) in XL04, but is there a way in XL08 to set up a default Page Setup? For instance, I ALWAYS want to print gridlines when I print something. But it's kind of a hassle to EVERY TIME have to go through Page Setup, click the Sheet tab, and select Gridlines.

It seems like there should be an easy way to set up default printing stuff, like what I want in the header or whether to number pages or not, but I just don't seem to be able to see how to do (could certainly be that I'm just not seeing it, of course).
 
C

CyberTaz

All Page Setup specifications should be retained by the file in which
they're set - just like Header/Footer, Margins, etc. Are you *saving* the
file after you change the settings or are you simply changing, printing,
then closing without a save?

If you want those settings to be automatically in effect in all new files
you create you need to create a workbook file in the Excel Startup folder
that has those settings in place or create a template & base new workbooks
on it. AFAIK, however, automatically applying those changes to existing
workbooks that have been saved with other settings would require a macro
(which can't be done in 2008).
 
B

Bob Greenblatt

Greetings.

I believe this was also not possible (or at least not obvious) in XL04, but is
there a way in XL08 to set up a default Page Setup? For instance, I ALWAYS
want to print gridlines when I print something. But it's kind of a hassle to
EVERY TIME have to go through Page Setup, click the Sheet tab, and select
Gridlines.

It seems like there should be an easy way to set up default printing stuff,
like what I want in the header or whether to number pages or not, but I just
don't seem to be able to see how to do (could certainly be that I'm just not
seeing it, of course).
Sure there is. Set up a workbook and/or worksheet template. It is explained
well in Help. Let us know if you age having trouble.
 
C

C. M.

I believe this was also not possible (or at least not obvious) in XL04,
but is there a way in XL08 to set up a default Page Setup? For
instance, I ALWAYS want to print gridlines when I print something.

For files that were given to you, you can try this AppleScript:

tell application "Microsoft Excel"
tell page setup object of active sheet
set print gridlines to true
end tell
end tell

That will set gridlines to print, regardless of how it was set when it
was sent to you.

You can set page numbers in the header like this:

tell application "Microsoft Excel"
tell page setup object of active sheet
set center header to "Stylin' page &P of &N"
end tell
end tell

"&P" and "&N" are formatting codes for page number and number of pages,
respectively.

This script will give you all the current values (run it in the script
editor) in the page setup object:

tell application "Microsoft Excel"
tell page setup object of active sheet
get properties
end tell
end tell

To set your own, you might have to do some experimenting by changing
values in the Page Setup dialog, then looking to see what changes in
the results of that script, but that ought to get you started.

charlie
 
J

JE McGimpsey

C. M. said:
For files that were given to you, you can try this AppleScript:

tell application "Microsoft Excel"
tell page setup object of active sheet
set print gridlines to true
end tell
end tell

Cool. I now have this in my script menu as "Toggle Print Gridlines":

tell application "Microsoft Excel"
tell page setup object of active sheet
set print gridlines to not (print gridlines)
display dialog "Print Gridlines preference set to " & ¬
(print gridlines as string) buttons {"OK"} default button 1
end tell
end tell
 

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