How do I print a footer on the last page only of an excel doc? Is this
possible?
How do I print a footer on the last page only of an excel doc? Is this
possible?
Hi
Only with code
Sub test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.RightFooter = ""
ActiveSheet.PrintOut From:=1, To:=TotPages - 1
.RightFooter = "Your Header info"
ActiveSheet.PrintOut From:=TotPages, To:=TotPages
End With
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"CLDelafield" <[email protected]> wrote in message news:[email protected]...
> How do I print a footer on the last page only of an excel doc? Is this
> possible?
CLD,
Print all pages except the last page.
Add the footer information.
Print the last page.
Close the workbook without saving.
Jim Cone
San Francisco, USA
"CLDelafield" <[email protected]> wrote in message
news:[email protected]...
How do I print a footer on the last page only of an excel doc?
Is this possible?
If, when you say pages, you're referring to sheets or worksheets, then the
answer is simple.
If you place a header or a footer on Sheet1, it does not automatically go
to the other sheets; therefore, put your footer on the last worksheet and
print all pages.
HTH and I'm not missing something.
Even at xl2003 version, are we still bound to "Excel4Macro" code to acheive
TotPages? hummm..
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
TIA,
"Ron de Bruin" <[email protected]> wrote in message
news:[email protected]...
> Hi
>
> Only with code
>
> Sub test()
> Dim TotPages As Long
> TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
> With ActiveSheet.PageSetup
> .RightFooter = ""
> ActiveSheet.PrintOut From:=1, To:=TotPages - 1
> .RightFooter = "Your Header info"
> ActiveSheet.PrintOut From:=TotPages, To:=TotPages
> End With
> End Sub
>
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
> "CLDelafield" <[email protected]> wrote in message
> news:[email protected]...
>> How do I print a footer on the last page only of an excel doc? Is this
>> possible?
>
>
Hi Jim
As far as I know Yes
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Jim May" <[email protected]> wrote in message news:nh8Ee.81579$Fv.72754@lakeread01...
> Even at xl2003 version, are we still bound to "Excel4Macro" code to acheive TotPages? hummm..
> TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
> TIA,
>
>
> "Ron de Bruin" <[email protected]> wrote in message news:[email protected]...
>> Hi
>>
>> Only with code
>>
>> Sub test()
>> Dim TotPages As Long
>> TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
>> With ActiveSheet.PageSetup
>> .RightFooter = ""
>> ActiveSheet.PrintOut From:=1, To:=TotPages - 1
>> .RightFooter = "Your Header info"
>> ActiveSheet.PrintOut From:=TotPages, To:=TotPages
>> End With
>> End Sub
>>
>>
>> --
>> Regards Ron de Bruin
>> http://www.rondebruin.nl
>>
>>
>> "CLDelafield" <[email protected]> wrote in message news:[email protected]...
>>> How do I print a footer on the last page only of an excel doc? Is this
>>> possible?
>>
>>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks