different footers macro

  • Thread starter Thread starter Linda
  • Start date Start date
L

Linda

The macro in the 7/25/03 post works well to have a
different footer on page 2 and none on page 1. I would
prefer the macro not to print, but to go into print
preview. Can you help? Thanks.
 
Hi Linda,
The thread for your other post can be referenced by:
http://google.com/[email protected]

I supplied an answer there as well for completeness. Wasn't
immediately seen that you still had a question until the words
"can you help", either that or some of us were asleep.

The macro you used is invoked twice in other words there are
two printings: one for page 1 and one for the remainder of
the pages. You cannot simulate this in Print Preview but
you can look at two separate Print Previews.

Instead of
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1
try
ActiveWindow.SelectedSheets..PrintPreview From:=1, To:=1

and the other PrintOut as well.

which was found by recording a macro that did a Print Preview
and substituting the code into the above.
ActiveWindow.SelectedSheets.PrintPreview
 
Linda,

I can't seem to get David's adjustment to work in the code I had given to
you (I'm somewhat of a novice programmer so that does not necessarily mean
his suggestion is incorrect)

However, I did find that adding "Preview:=True" to the end of the PrintOut
statements will generate a preview for each section. Once you have the
preview open, I believe you should be able to select "Close" and the page(s)
will not print. After previewing the first section and selecting "Close" the
macro will then preview the second selection.

To be clear, the full statement is below.

ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Preview:=True

HTH

PC
 
Hi Paul,
One less method to skin a cat. Sorry didn't think I needed to test.
I will mark the other thread with your answer. The PrintPreview
method does not allow arguments.
 
Back
Top