Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DRK DRK is offline
external usenet poster
 
Posts: 40
Default Putting Page Number in last page text

I have a workbook which uses a print macro. The printout is for several
worksheets which have variable ranges or even entire pages being
included/excluded based on Booleans.

On the last page of the printout I need to include the page number for the
last page before this legal notice and then subtract 2 and then include that
value on the last page of the legal notice (which is fixed at 2 pages in
length).

For example - my printout takes 20 pages before I get to the legal notice. I
have to capture that value of 20 and put it in a footnote on page 22 that
reads "The attached document totals 20 pages excluding this acknowledgment."
--
DRK
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Putting Page Number in last page text

I'm not sure if this will help you but to get the number of pages that will
print with the current page setup you can use this code:

Pages = Application.ExecuteExcel4Macro("get.document(50)")

--
Jim
"DRK" wrote in message
...
|I have a workbook which uses a print macro. The printout is for several
| worksheets which have variable ranges or even entire pages being
| included/excluded based on Booleans.
|
| On the last page of the printout I need to include the page number for the
| last page before this legal notice and then subtract 2 and then include
that
| value on the last page of the legal notice (which is fixed at 2 pages in
| length).
|
| For example - my printout takes 20 pages before I get to the legal notice.
I
| have to capture that value of 20 and put it in a footnote on page 22 that
| reads "The attached document totals 20 pages excluding this
acknowledgment."
| --
| DRK


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Putting Page Number in last page text

Hi Dirk,

I have just added a function to my litLIB addin to achieve this. You can
have a look at the addin he www.oraxcel.com/projects/litlib.

I have added the formula =PageNumber and =PageCount

Hope this helps,

Gerrit-Jan Linker
Linker IT Software
www.oraxcel.com

On the last page of the printout I need to include the page number for the
last page before this legal notice and then subtract 2 and then include
that
value on the last page of the legal notice (which is fixed at 2 pages in
length).

For example - my printout takes 20 pages before I get to the legal notice.
I
have to capture that value of 20 and put it in a footnote on page 22 that
reads "The attached document totals 20 pages excluding this
acknowledgment."
--
DRK



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format page number in excel footer to start at a specific page # straitctrydncr Excel Discussion (Misc queries) 4 April 28th 23 07:45 PM
Remove big gray page number on Page Break Preview??? annafred Excel Discussion (Misc queries) 1 January 9th 07 02:28 AM
change page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:16 AM
change and/or remove page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:15 AM
sheet tabs as page number and in a cell page of pages? [email protected] Excel Discussion (Misc queries) 0 November 22nd 05 02:43 PM


All times are GMT +1. The time now is 07:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"