Re: setting header options in another nb with code
- To: mathgroup at smc.vnet.net
- Subject: [mg120945] Re: setting header options in another nb with code
- From: Armand Tamzarian <mike.honeychurch at gmail.com>
- Date: Thu, 18 Aug 2011 03:23:03 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <j2g39s$1fe$1@smc.vnet.net>
On Aug 17, 7:57 pm, Phil Hammond <p... at hammondo.org> wrote:
> In a Notebook I have:
>
> nb = CreateDocument[]
>
> and then:
>
> SetOptions[nb, FirstPageHeader -> True, FirstPageFooter -> True,
> PageHeaders -> {{Cell[quizDate, 14], Cell[teacher, 14],
> Cell[hdrName, 14]}, {Cell[hdrName, 14], Cell[teacher, 14],
> Cell[quizDate, 14]}}]
>
> where quizDate, teacher, and hdrName are Strings to be placed left,
> center, right in the header.
>
> The target nb gets the Strings in the right places in the header, but
> their font size is not 14. Also, the first page header is unset.
>
> Help please?? Thanks-
Try this:
SetOptions[nb,
PrintingStartingPageNumber -> 1,
PageHeaders -> {{Cell[quizDate, FontSize -> 14],
Cell[teacher, FontSize -> 14],
Cell[hdrName, FontSize -> 14]}, {Cell[hdrName, FontSize -> 14],
Cell[teacher, FontSize -> 14], Cell[quizDate, FontSize -> 14]}},
PageFooters -> {{None, None, None}, {None, None, None}},
PrintingOptions -> {
FirstPageHeader -> True,
FirstPageFooter -> True}];
Mike