Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Temporarily Suppressing the Printing of Page Footers
Hi
I am creating a formal document (annual accounts) in Excel and while working on the Excel file want the page footers to print but need to be able to suppress the footers to show the draft pages as they will look finally. I am doing this by printing the footer “white-on-white”. I then want to revert to having the original footers by having black font in the footer. So I will use code along the lines: ..LeftFooter = "&K00+000”&.LeftFooter but need to be able to eliminate any previous “&K..” coding in the original .LeftFooter, which Excel does automatically when changing the code manually. Can someone tell me how to eliminate programmatically any previous font colour coding in the footer? Many thanks Tim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Temporarily Suppressing the Printing of Page Footers
Hi
I am creating a formal document (annual accounts) in Excel and while working on the Excel file want the page footers to print but need to be able to suppress the footers to show the draft pages as they will look finally. I am doing this by printing the footer €śwhite-on-white€ť. I then want to revert to having the original footers by having black font in the footer. So I will use code along the lines: .LeftFooter = "&K00+000€ť&.LeftFooter but need to be able to eliminate any previous €ś&K..€ť coding in the original .LeftFooter, which Excel does automatically when changing the code manually. Can someone tell me how to eliminate programmatically any previous font colour coding in the footer? Many thanks Tim I'm not understanding your issue! Any 'new' settings made in .PageSetup prior to Printout will persist until changed again. Perhaps all you need to do is build a custom procedure that will 'toggle' this at runtime... Sub PrintDoc(Optional DraftMode As Boolean = False) Dim sColor$ Const sWhite$ = "&K00+000": Const sBlack$ = "&K000000" sColor = IIf(DraftMode, sWhite, sBlack) With ActiveSheet.PageSetup .LeftFooter = sColor & .LeftFooter 'and so on... End With 'ActiveSheet ActiveSheet.PrintOut End Sub ...and use it like this... Sub PrintFormalDoc() PrintDoc End Sub Sub PrintDraftDoc() PrintDoc True End Sub -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Temporarily Suppressing the Printing of Page Footers
On 10-Jun-16 3:57 PM, Tim Childs wrote:
Hi I am creating a formal document (annual accounts) in Excel and while working on the Excel file want the page footers to print but need to be able to suppress the footers to show the draft pages as they will look finally. I am doing this by printing the footer “white-on-white”. I then want to revert to having the original footers by having black font in the footer. So I will use code along the lines: .LeftFooter = "&K00+000”&.LeftFooter but need to be able to eliminate any previous “&K..” coding in the original .LeftFooter, which Excel does automatically when changing the code manually. Can someone tell me how to eliminate programmatically any previous font colour coding in the footer? Many thanks Tim Hi Garry Thanks v much for response. The issue was the way I was embedding the colour constants into the footer whereas you have shown me a way that enables me to avoid doing this. I will incorporate it into my print procedure. Best wishes Tim |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Temporarily Suppressing the Printing of Page Footers
On 10-Jun-16 3:57 PM, Tim Childs wrote:
Hi I am creating a formal document (annual accounts) in Excel and while working on the Excel file want the page footers to print but need to be able to suppress the footers to show the draft pages as they will look finally. I am doing this by printing the footer €śwhite-on-white€ť. I then want to revert to having the original footers by having black font in the footer. So I will use code along the lines: .LeftFooter = "&K00+000€ť&.LeftFooter but need to be able to eliminate any previous €ś&K..€ť coding in the original .LeftFooter, which Excel does automatically when changing the code manually. Can someone tell me how to eliminate programmatically any previous font colour coding in the footer? Many thanks Tim Hi Garry Thanks v much for response. The issue was the way I was embedding the colour constants into the footer whereas you have shown me a way that enables me to avoid doing this. I will incorporate it into my print procedure. Best wishes Tim Thanks for the feedback... -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing odd and even page footers | Excel Programming | |||
Printing odd and even page footers | Excel Programming | |||
Printing Headers on only first page and Footers on only last page | Excel Discussion (Misc queries) | |||
Hide individual/range cells and temporarily increase scale for printing | Excel Programming | |||
Suppressing or turning off the Printing dialog | Excel Programming |