Freigeben über


CPAO: Editing the Footer of a Template

 

Now on to the formatting the footer area of the page. Here is a screenshot and the code:

 

 

      <!-- Standard Footer -->

      <Grid Row="4" Column="1" VerticalAlignment="Top" Margin="0,4,0,0"

            RowSetting="Auto" ColumnSetting="*,*,*">

        <CalendarText Row="0" Column="0" Date="#[Now]"

                      Text="#[@TemplateDocInfo_PrintTime]"

                      HorizontalAlignment="Left" FontSize="7pt"/>

        <CalendarText Row="0" Column="1" Text="#[@TemplateDocInfo_Page]"

                      HorizontalAlignment="Center" FontSize="7pt"/>

        <CalendarText Row="0" Column="2" Text="#[@TemplateDocInfo_UserName]"

                      HorizontalAlignment="Right" FontSize="7pt"/>

      </Grid>

 

This is all fairly straightforward.  First in green is the formatting for this area It is describing Row 4 and Column 1 of the overall Page (see the Page editing section for more). It is going to automatically size this one row, and then there are three columns specified - one for the time/dat, one for the page number, and one for the user who is doing the printing.

 

Okay, then in red is the line that describes how to do the Date/Time in the first column.

Then the purple code describes how to do the page number(s) in the second column.

Then the blue code shows how to place the username in the third column.

 

I have had requests to remove/move/change things in the footer. You can put direct text placed in quotes in these areas. Here is an example of a change here:

 

  

    <!-- Standard Footer -->

      <Grid Row="4" Column="1" VerticalAlignment="Top" Margin="0,4,0,0"

            RowSetting="Auto" ColumnSetting="*,*,*">

        <CalendarText Row="0" Column="0" Text="Wingtip Toys"

                      HorizontalAlignment="Left" FontSize="8pt"

                      FontWeight="Bold"/>

        <CalendarText Row="0" Column="1" Text="#[@TemplateDocInfo_Page]"

                      HorizontalAlignment="Center" FontSize="7pt"/>

        <CalendarText Row="0" Column="2" Date="#[Now]"

                      Text="#[@TemplateDocInfo_PrintTime]"

                      HorizontalAlignment="Right" FontSize="7pt"/>

      </Grid>

 

Okay so here I moved the date/time over to the right side of the footer, and I placed a company name on the left side of the footer using straight text in quotes for the "Text=" setting. You can use your own text anywhere there is a "Text=" setting - like in the Header - so that you can further customize your printout.

 

One thing that has been requested a few times is for the Calendar User's name to be printed - either in the footer or in the header, etc. There is no variable to do this automatically in the Calendar Printing Assistant. The username variable  as shown above - "#[@TemplateDocInfo_UserName]" - will place the user who is logged into the machine on the page - not necessarily the user whose calendar is open in Outlook. Something that can be done to get around this is to customize the header and/or footer with a particular user's name, and then name the template with that user's name - like for an executive/manager/etc.

 

I will show how to edit the name of the template as seen in the Calendar Printing Assistant UI in the next section on editing the Metadata.xml.