Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Format page number in excel footer to start at a specific page # | Excel Discussion (Misc queries) | |||
Remove big gray page number on Page Break Preview??? | Excel Discussion (Misc queries) | |||
change page number watermark in page break preview | Excel Discussion (Misc queries) | |||
change and/or remove page number watermark in page break preview | Excel Discussion (Misc queries) | |||
sheet tabs as page number and in a cell page of pages? | Excel Discussion (Misc queries) |