• CPAO: Using Colors for Categories and Private Items

     

    It seems that one of the "holy grails" for the Calendar Printing Assistant is to be able to colorize entire appointments with the category colors for those appointments. There is a way to signify the category with CPAO - which is the colored dot that I have used / showed in previous posts. However - since Outlook actually makes the entire appointment the color of the assigned category - people want to see this in CPAO as well.

     

    Well - after editing these templates for a couple years I did find a way that you CAN actually color entire appointments with the category color. However - this is a tedious task, it is difficult to manage, and it is limited in ability. So it can be done - but it may or may not be worth the effort and administrative upkeep.

     

    Also - you can colorize Private Items - and that is a bit easier to do and does not require any upkeep - so I'll show that as well.

     

    So here is a sample of a template I created to demonstrate this:

     

     

    Yes - this is actually a template I created and it is really showing the color categories without the dots.

    Also please note the private item at 5:00 on Monday - it is colored gray.

     

    This template was modified starting with the Work Week 02 Letter template, and I added the necessary code to do the category and private item coloring. I also modified the timescale to include more of the day, and modified the header a bit - as that seems to help get the data in the appointments a little better since the timescale was increased.

     

    So here is the code I added for the colorization:

     

    ...

    ...

                    <TimeSlot Orientation="Fill" StartHour="7" EndHour="19"

                              MinorUnit="30" Style="SingleBody"

                              Background="Transparent">

                      <Appointment Style="SingleAppointment" Background="White">

     

                        <!-- Make the Background actually match the category... -->

                        <!-- The Category Name is used for this - and since it can

                                 be changed in Outlook, it is only feasible if it is

                                 NEVER changed -->

                        <!-- and ALL clients who print using CPAO must use the same

                                 names for the same colors -->

                        <!-- AND - even with this, users should only ever use ONE

                                 category per meeting/appt. as only one will work -->

                        <ConditionalFormat Condition="Categories eq 'Red Category'"

                                           Background="Red"/>

                        <ConditionalFormat Condition="Categories eq 'Blue Category'"

                                           Background="Blue"/>

                        <ConditionalFormat Condition="Categories eq 'Green

                                           Category'" Background="Green"/>

                        <ConditionalFormat Condition="Categories eq 'Orange

                                           Category'" Background="Orange"/>

                        <ConditionalFormat Condition="Categories eq 'Yellow

                                           Category'" Background="Yellow"/>

     

                        <!-- Make the appt GRAY if it's marked as PRIVATE...  -->

                        <!-- Had to put this below the Category section so that it

                                 would work over a category -->

                        <ConditionalFormat Condition="Sensitivity eq 'Private'"

                                           Background="Gray"/>

     

                        <Bar Orientation="Left" Visibility="Collapsed" Width="5"

                             BorderThickness="0,0,1,0">

                          <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarFree"/>

                          <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarTentative"/>

                          <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarOOF"/>

                        </Bar>

                        <Content Orientation="Fill" Margin="2,0,2,0" Separator="116"

                                 FontSize="8pt" SeparatorFontFamily="Wingdings"

                                 TextWrapping="WrapWithOverflow">

                          <ContentElement Source="OddTimes"/>

                          <ContentElement Source="Subject" FontWeight="Bold"/>

                          <ContentElement Source="Location"/>

                          <ContentElement Source="Organizer"/>

                         

                        </Content>

                      </Appointment>

                    </TimeSlot>

    ...

    ...

     

    So to go through this briefly - I set the background color of the appointments to "White" - which is something I have shown before. So all appointments will have a White background unless the category is different. This is where the conditional statements come in.

    These conditional statements will test the Category Name - not the Category Color. If the Category Name matches the Category Name from Outlook, then it will color the background with the color that I choose.

    Please note that users can change the Category Name in Outlook - so that is one of the big caveats of doing this. Also - I - as the person editing the template - must know that "X" Category Name matches up to "Y" Category Color. That is so I will put in the right info so that the right color will show for the particular appointment with the particular category name applied to it.

    So as long as you can get a mapping of color to Outlook category name - then you can get this working. But the user can never change the name of the category. Or else if they do - then you will have to go back in and update the template accordingly. Same problem if a category is added - it would have to be added to the template and refreshed. Also - if a user assigns 2 or more categories, then this won't work and the appointment will go back to the default color - in this case White.

     

    Now for the Private Items - the code is very similar. There is a test to see if the Sensitivity is set to Private. If so - then the background color is set to Gray. You could set it to any color you like. Since this is more static as far as the test - it is MUCH easier to implement and maintain.

     

    So - yes, it can be done. Depending on the environment where it's deployed, it could work very well. But it could also break a whole lot in other environments.

     

    I attached the Content.xml for this template so you can use or compare with a template you're working on...

     

    Cheers!

  • CPAO: Editing A Weekly Template

     

    I wanted to put a Weekly CPAO template example up - so here it is. I will start out with the Weekly List 01 Letter Template, and do some modifications to it. I will not cover the entire template - just changes that I make in it to show how it can be modified. For changes to an entire template - you should look at the Monthly Template series posted here previously. That series covers an entire template and what settings in the Content.xml and Metadata.xml are used for each section in that template. Most of what is covered there pertains to any template - Daily, Weekly, Monthly, or Yearly.

     

    Okay - so here is how the Weekly List 01 template looks in its original form:

     

     

    Some things to notice on this template are:

    1. They show which mailbox the appointment belongs to using the blue dot.
    2. The category is shown after the appointments along with the category name.
    3. There are lines breaking up each day - but not into any kind of time scale.
    1. There is an All Day Event on Friday - but it is listed just like every other appointment with the times set 12am to 12am.

     

    So on to the modifications.

    1. I want to remove the blue dots, and the extra column that the blue dots are in. They are okay if you are opening more than one user's calendar in Outlook - but even then, you will just see a blue dot for one calendar, and then a red diamond or some other colored symbols for additional calendars. There is not way to print a legend of which calendar is which, so I like to just remove the blue dots.
    2. I want to put the category dot (the color of the category is the color of the dot) both in front and behind the appointment so that the category is more easily seen. I also don't want the category name - that seems extraneous - and takes up room on the page.
    3. I want to remove the lines breaking up each day - as they don't seem to have any functional use.
    4. I also want to differentiate the All Day Events so they can be more easily seen.

     

     

    Here is the change for modification 1:

     

    Original template (Content.xml):

     

    ...

    ...

          <!--WeekDayCalendar List for Original Week List Template -->

          <WeekDayCalendar Row="3" Column="1">

            <WeekFormat>

              <StandardGrid WeekendMerge="true" NumRows="3" NumColumns="2"/>

            </WeekFormat>

            <DayFormat>

              <DockPanel Margin="2" Style="LevelOneParent">

                <CalendarText Orientation="Top" Height=".2in" FontSize="9pt"

                              Text="#[@TemplateDate_DayNameDayNumber]"

                              Style="LevelOneTitle"/>

                <List Orientation="Fill" FontSize="8pt" MinimumListWidth="60"

                      ShowEmptyRow="true" MaxRowWrap="3" RowSize="16"

                      TypeFilter="AppointmentsTasksAllDayAppointments"

                      MinorLineCount="3" Style="SingleBodyBorder">

                  <Columns>

                    <Column Width=".2in" Left="2" Top="3" Right="2" Bottom="2"

                            Style="AccentFill">

                      <Sources>

                        <Source Name="CalendarIcon"/>

                      </Sources>

                    </Column>

                    <Column Width=".3in" RightBorderStrokeThickness="1"

                            RightBorderStroke="style!SingleLineStroke" Left="2"

                            Top="3" Right="2" Bottom="2" Style="AccentFill">

                      <Sources>

                        <Source Name="Complete"/>

                      </Sources>

                    </Column>

    ...

    ...

     

     

     

     

    Okay - so the code in RED here defined two columns. The first column is for the Calendar that the appointments belong to - it is specified by "Calendar Icon". The second column is for Tasks, and will show  tasks in progress. It also has the right border line. I added a Task so you can see this better:

     

     

    As long as the task is not completed - it will show in the template like this.

    So to get rid of these two columns - we only need to remove the code from the template:

     

          <!--WeekDayCalendar List for Original Week List Template -->

          <WeekDayCalendar Row="3" Column="1">

            <WeekFormat>

              <StandardGrid WeekendMerge="true" NumRows="3" NumColumns="2"/>

            </WeekFormat>

            <DayFormat>

              <DockPanel Margin="2" Style="LevelOneParent">

                <CalendarText Orientation="Top" Height=".2in" FontSize="9pt"

                              Text="#[@TemplateDate_DayNameDayNumber]"

                              Style="LevelOneTitle"/>

                <List Orientation="Fill" FontSize="8pt" MinimumListWidth="60"

                      ShowEmptyRow="true" MaxRowWrap="3" RowSize="16"

                      TypeFilter="AppointmentsTasksAllDayAppointments"

                      MinorLineCount="3" Style="SingleBodyBorder">

                  <Columns>

               <!-- First Two Column Entries Were Removed -->

                    <Column Width="Auto" ShowDuplicates="True" Left="2" Top="2"

                            Right="2" Bottom="2" >

                      <Sources>

                        <Source Name="StartTime" Format="t"/>

                        <Source Name="EndTime" Format="t" StartSeparator=" - "/>

                      </Sources>

                    </Column>

                    <Column Width="*" Left="4" Top="2" Right="2" Bottom="2">

                      <Sources>

                        <Source Name="Subject"/>

                        <Source Name="Due" StartSeparator=" (" EndSeparator=")"

                                Format="d"/>

                        <Source Name="Location" StartSeparator=" ("

                                                EndSeparator=")"/>

                        <Source Name="CategorySymbols" StartSeparator=" "/>

                        <Source Name="Categories" StartSeparator=" "/>

                      </Sources>

                    </Column>

                  </Columns>

    ...

    ...

     

    And now the template looks a little different - the Calendar and Task signifiers are gone:

     

     

     

    Alright! Now for mod 2. You can see in the shot above that the category is signified with a colored dot for that category. It is followed by the Category name. I want to change this so the name is gone, and the colored dot is before and after the appointment. Here is that change:

     

    Original:

     

    ...

    ...

               <!-- First Two Column Entries Were Removed -->

                    <Column Width="Auto" ShowDuplicates="True" Left="2" Top="2"

                            Right="2" Bottom="2" >

                      <Sources>

                        <Source Name="StartTime" Format="t"/>

                        <Source Name="EndTime" Format="t" StartSeparator=" - "/>

                      </Sources>

                    </Column>

                    <Column Width="*" Left="4" Top="2" Right="2" Bottom="2">

                      <Sources>

                        <Source Name="Subject"/>

                        <Source Name="Due" StartSeparator=" (" EndSeparator=")"

                                Format="d"/>

                        <Source Name="Location" StartSeparator=" ("

                                                EndSeparator=")"/>

                        <Source Name="CategorySymbols" StartSeparator=" "/>

                        <Source Name="Categories" StartSeparator=" "/>

                      </Sources>

                    </Column>

    ...

    ...

     

    The code in GREEN here describes how things will show. We just need to move some elements around here to get what we want - namely the "CategorySymbols" and the "Categories". So here is the new code:

     

    ...

    ...

     

               <!-- First Two Column Entries Were Removed -->

                    <Column Width="Auto" ShowDuplicates="True" Left="2" Top="2"

                            Right="2" Bottom="2" >

                      <Sources>

                        <Source Name="StartTime" Format="t"/>

                        <Source Name="EndTime" Format="t" StartSeparator=" - "/>

                      </Sources>

                    </Column>

                    <Column Width="*" Left="4" Top="2" Right="2" Bottom="2">

                      <Sources>

                        <Source Name="CategorySymbols" EndSeparator=" "/>

                        <Source Name="Subject"/>

                        <Source Name="Due" StartSeparator=" (" EndSeparator=")"

                                Format="d"/>

                        <Source Name="Location" StartSeparator=" ("

                                                EndSeparator=")"/>

                        <Source Name="CategorySymbols" StartSeparator=" "/>

                        <!-- Removed "Categories" -->

                      </Sources>

                    </Column>

    ...

    ...

     

    And here is how this looks now:

     

     

     

    Okay - modification 3 is to get rid of the lines shown inside each day. This one is pretty easy too. Here's the code:

     

    Original:

     

    ...

    ...

          <!--WeekDayCalendar List for Original Week List Template -->

          <WeekDayCalendar Row="3" Column="1">

            <WeekFormat>

              <StandardGrid WeekendMerge="true" NumRows="3" NumColumns="2"/>

            </WeekFormat>

            <DayFormat>

              <DockPanel Margin="2" Style="LevelOneParent">

                <CalendarText Orientation="Top" Height=".2in" FontSize="9pt"

                              Text="#[@TemplateDate_DayNameDayNumber]"

                              Style="LevelOneTitle"/>

                <List Orientation="Fill" FontSize="8pt" MinimumListWidth="60"

                      ShowEmptyRow="true" MaxRowWrap="3" RowSize="16"

                      TypeFilter="AppointmentsTasksAllDayAppointments"

                      MinorLineCount="3" Style="SingleBodyBorder">

                  <Columns>

               <!-- First Two Column Entries Were Removed -->

    ...

    ...

     

    The "MinorLineCount" attribute is all we need to change here. Since there are 3 lines in each day, you would think intuitively that you would want to set it to "0" instead of "3", but that would be incorrect. Try setting it to "0" to see the effect - it will put many lines in each day. So you actually want to set it to a pretty high number so that CPAO will just not render the lines. I don't know what the threshold is - but I found that setting this to "50" seems to do the trick:

     

    ...

    ...

          <!--WeekDayCalendar List for Original Week List Template -->

          <WeekDayCalendar Row="3" Column="1">

            <WeekFormat>

              <StandardGrid WeekendMerge="true" NumRows="3" NumColumns="2"/>

            </WeekFormat>

            <DayFormat>

              <DockPanel Margin="2" Style="LevelOneParent">

                <CalendarText Orientation="Top" Height=".2in" FontSize="9pt"

                              Text="#[@TemplateDate_DayNameDayNumber]"

                              Style="LevelOneTitle"/>

                <List Orientation="Fill" FontSize="8pt" MinimumListWidth="60"

                      ShowEmptyRow="true" MaxRowWrap="3" RowSize="16"

                      TypeFilter="AppointmentsTasksAllDayAppointments"

                      MinorLineCount="50" Style="SingleBodyBorder">

                  <Columns>

               <!-- First Two Column Entries Were Removed -->

    ...

    ...

     

    Here's how the entire template looks now:

     

    Okay - everything looks how I'm wanting now except for the All Day Events. I want those to be placed at the top of the day in a box so that it is differentiated from regular appointments. A decent amount of code must be added for this - I am merely copying it from another template that has the All Day Events set the way I am wanting.

     

    Original Code:

     

    ...

    ...

          <!--WeekDayCalendar List for Original Week List Template -->

          <WeekDayCalendar Row="3" Column="1">

            <WeekFormat>

              <StandardGrid WeekendMerge="true" NumRows="3" NumColumns="2"/>

    <!-- I need to put new code here, as I see in another template -->

            </WeekFormat>

            <DayFormat>

              <DockPanel Margin="2" Style="LevelOneParent">

                <CalendarText Orientation="Top" Height=".2in" FontSize="9pt"

                              Text="#[@TemplateDate_DayNameDayNumber]"

                              Style="LevelOneTitle"/>

    <!-- I need to put new code here, as I see in another template -->

                <List Orientation="Fill" FontSize="8pt" MinimumListWidth="60"

                      ShowEmptyRow="true" MaxRowWrap="3" RowSize="16"

                      TypeFilter="AppointmentsTasksAllDayAppointments"

                      MinorLineCount="50" Style="SingleBodyBorder">

                  <Columns>

               <!-- First Two Column Entries Were Removed -->

    ...

    ...

                  <ConditionalFormat Condition="DayOfWeek eq 'sat'">

                    <Background>

                      <SolidColorBrush Color="style!WeekendColor" Tint=".9"/>

                    </Background>

                  </ConditionalFormat>

                </List>

    <!-- I need to put new code here, as I see in another template -->

              </DockPanel>

            </DayFormat>

          </WeekDayCalendar>

    ...

    ...

     

     

    New Code:

     

    ...

    ...

          <!--WeekDayCalendar List for Original Week List Template -->

          <WeekDayCalendar Row="3" Column="1">

            <WeekFormat>

              <StandardGrid WeekendMerge="true" NumRows="3" NumColumns="2">

                 <SpanningAllDayArea MinSize="0" MaxSize="52" IsUniform="false">

                    <AllDayAppointment Height="16" Margin="3,1,3,0"

                                       Style="SingleAppointment">

                      <Bar Visibility="Collapsed" Orientation="Left" Width="5"

                           BorderThickness="0,0,1,0">

                        <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                           Visibility="Visible"

                                           Style="SingleAppointmentBarFree"/>

                        <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                           Visibility="Visible"

                                           Style="SingleAppointmentBarTentative"/>

                        <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                           Visibility="Visible"

                                           Style="SingleAppointmentBarOOF"/>

                      </Bar>

                      <Content Orientation="Fill" Margin="2,0,2,0"

                               HorizontalAlignment="Center" Separator="116"

                               SeparatorFontFamily="WingDings" FontSize="8pt"

                               TextWrapping="NoWrap">

                        <ContentElement Source="Subject" FontWeight="Bold"/>

                        <ContentElement Source="Location"/>

                        <ContentElement Source="Organizer"/>

                        <ContentElement Source="CategorySymbols"/>

                      </Content>

                    </AllDayAppointment>

                  </SpanningAllDayArea>

               </StandardGrid>

            </WeekFormat>

            <DayFormat>

              <DockPanel Margin="2" Style="LevelOneParent">

                <CalendarText Orientation="Top" Height=".2in" FontSize="9pt"

                              Text="#[@TemplateDate_DayNameDayNumber]"

                              Style="LevelOneTitle"/>

                <DockPanel Orientation="Fill" Style="LevelLeafBody">

                  <SpanningAllDayAreaPlaceholder Orientation="Top" />

                     <List Orientation="Fill" FontSize="8pt" MinimumListWidth="60"

                           ShowEmptyRow="true" MaxRowWrap="3" RowSize="16"

                           TypeFilter="AppointmentsTasks" MinorLineCount="50"

                           Style="SingleBodyBorder" >

                <!-- First Two Column Entries Were Removed -->

    ...

    ...

                      </ConditionalFormat>

                      <ConditionalFormat Condition="DayOfWeek eq 'sat'">

                        <Background>

                          <SolidColorBrush Color="style!WeekendColor" Tint=".9"/>

                        </Background>

                      </ConditionalFormat>

                    </List>

                 </DockPanel>

              </DockPanel>

            </DayFormat>

          </WeekDayCalendar>

     

    So this change is pretty complex. First I added the All Day Event code under the WeekFormat section.

    Then I added a dock panel in the DayFormat section and specified that the AllDay appointments be placed at the top. I changed the List TypeFilter to only show Appointments and Tasks, and NOT All Day Appointments anymore. Then I closed out the dock panel section.

     

    And here is how the final modified template looks:

     

     

    Notice that the All Day Event for Friday is now enclosed and separated from regular appointments.

     

    So this shows how you can go in and modify a Weekly CPAO template as needed for your requirements.

    This particular modification set is similar to that request from a customer who wanted the output to look more like the Outlook 2003 Weekly Print view.

     

    I have attached the modified Content.xml so you can use it yourself and/or compare the changes I made with the original.

     

     

  • CPAO: Editing a Daily Template - Part 2

     

    In the previous section showing a 3x5 daily calendar printout using CPAO, I did not include a timeline. In this final example for a daily template I will show what that looks like:

     

     

    So the big difference here is the timeline for the day on the left side of the view. The appointments are placed where they occur during the day instead of just being listed in order as in the previous example.

     

    Now - if you have a particularly busy schedule - the previous example with just a listing of appointments may be the best solution. But if you have a schedule where appointments don't overlap a lot, or is not extremely busy most of the time - then this might be a good solution.

     

    Here is the listing of the Content.xml for this template:

     

    <?xml version="1.0" encoding="utf-8"?>

    <!-- Copyright (c) 2007, Microsoft Corporation. All rights reserved. -->

    <!-- Daily 3x5 with Timescale -->

    <Template xmlns="http://schemas.microsoft.com/2005/xcal" Version="1.0.0">

      <Display>

        <Page RowSetting="0.15in,0.30in,0.0in,*,0.30in"

              ColumnSetting="0.20in,*,0.20in" Style="StandardText">

          <!-- Background -->

          <Rectangle Row="0" Column="0" RowSpan="5" ColumnSpan="3"

                     Style="PageBackground"/>

          <!-- Day Header A-->

          <Grid Row="1" Column="1" RowSetting="Auto" ColumnSetting="*,*,*"

                Style="LevelOneTitle" Padding=".04in">

             <!-- Day/Date -->

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

                           #[@TemplateDate_DayNumber], #[@TemplateDate_YearNumber]"

                           Margin="2" FontSize="8pt" Style="AccentText"/>

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

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

          </Grid>

          <!--Day Slot-->

          <DayCalendar Row="3" Column="1">

            <DayFormat>

              <DockPanel Style="LevelOneParent">

                <Grid Orientation="Fill" Style="LevelOneBody" RowSetting="*,Auto"

                      ColumnSetting="*">

                  <DockPanel Row="0" Column="0">

                    <SingleAllDayArea Orientation="Top" MinSize="8" MaxSize="80"

                                      Padding="1">

                      <AllDayAppointment Height="12" Margin="5,0,5,1"

                                         Style="SingleAppointment" Background="White">

                        <Bar Visibility="Collapsed" Orientation="Left" Width="5"

                             BorderThickness="0,0,1,0">

                          <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarFree"/>

                          <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarTentative"/>

                          <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarOOF"/>

                        </Bar>

                        <Content Orientation="Fill" Margin="2,0,2,0"

                                 HorizontalAlignment="Center" Separator="116"

                                 SeparatorFontFamily="WingDings" FontSize="4pt"

                                 TextWrapping="NoWrap">

                          <ContentElement Source="CategorySymbols"/>

                          <ContentElement Source="Subject" FontSize="6pt"

                                          FontWeight="Bold"/>

                          <ContentElement Source="Location" FontSize="6pt"/>

                          <ContentElement Source="CategorySymbols"/>

                        </Content>

                      </AllDayAppointment>

                    </SingleAllDayArea>

                    <TimeScale Orientation="Left" Width=".25in" StartHour="7"

                               EndHour="19" MajorFontWeight="Bold"

                               MinorUnitShow="true" MinorUnit="15"

                               Style="TimeScale" />

                    <TimeSlot Orientation="Fill" StartHour="7" EndHour="19"

                              MinorUnit="30" Style="SingleBody">

                      <Appointment Style="SingleAppointment" Background="White">

                        <Bar Orientation="Left" Visibility="Collapsed" Width="5"

                             BorderThickness="0,0,1,0">

                          <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarFree"/>

                          <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarTentative"/>

                          <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarOOF"/>

                        </Bar>

                        <Content Orientation="Fill" Margin="2,0,2,0" Separator="116"

                                 FontSize="6pt" SeparatorFontFamily="Wingdings"

                                 TextWrapping="WrapWithOverflow">

                          <ContentElement Source="CategorySymbols"/>

                          <ContentElement Source="OddTimes" FontSize="6pt"/>

                          <ContentElement Source="Subject" FontSize="6pt"

                                          FontWeight="Bold"/>

                          <ContentElement Source="Location" FontSize="6pt"/>

                          <ContentElement Source="CategorySymbols"/>

                        </Content>

                      </Appointment>

                    </TimeSlot>

                  </DockPanel>

                </Grid>

              </DockPanel>

            </DayFormat>

          </DayCalendar>

          <!-- 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="6pt"/>

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

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

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

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

          </Grid>

        </Page>

      </Display>

    </Template>

     

    This listing is very similar to the previous daily example except for the entries in green and red. I should reiterate here that if you have not gone through the Standard Monthly Legal template series , it will be very good to do so - as it explains a lot more about the settings seen in the CPAO templates, as well as how to edit them and save them.

     

    Okay - that out of the way, the green settings above are for the time scale and for describing what to fill in and where for each time slot.

     

                    <TimeScale Orientation="Left" Width=".25in" StartHour="7"

                               EndHour="19" MajorFontWeight="Bold"

                               MinorUnitShow="true" MinorUnit="15"

                               Style="TimeScale" />

                    <TimeSlot Orientation="Fill" StartHour="7" EndHour="19"

                              MinorUnit="30" Style="SingleBody">

     

    In the TimeScale section, the start and end hours tell how much of a time scale to use on the paper. For this example the calendar starts at 7am and ends at 7pm. The MinorUnitShow and MinorUnit settings describe what kind of time scale to show. Here it is set to "true" and "15". That means it will show 15 minute increments in the timescale :

     

     

    The TimeSlot section has similar Start and End hour settings. The MinorUnit setting of "30" will force a 15 minute meeting (or anything shorter than 30 minutes) to show in a 30 minute appointment space. I do this here for the small 3x5 daily template so you can really read the text. Otherwise the text gets cut off on the bottom. Here is a comparison:

     

    MinorUnit="30":

     

    MinorUnit="15":

     

     

    Okay - the settings in red above are left - and they describe how the appointments will look.

     

                      <Appointment Style="SingleAppointment" Background="White">

                        <Bar Orientation="Left" Visibility="Collapsed" Width="5"

                             BorderThickness="0,0,1,0">

                          <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarFree"/>

                          <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarTentative"/>

                          <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarOOF"/>

                        </Bar>

                        <Content Orientation="Fill" Margin="2,0,2,0" Separator="116"

                                 FontSize="6pt" SeparatorFontFamily="Wingdings"

                                 TextWrapping="WrapWithOverflow">

                          <ContentElement Source="CategorySymbols"/>

                          <ContentElement Source="OddTimes" FontSize="6pt"/>

                          <ContentElement Source="Subject" FontSize="6pt"

                                          FontWeight="Bold"/>

                          <ContentElement Source="Location" FontSize="6pt"/>

                          <ContentElement Source="CategorySymbols"/>

                        </Content>

                      </Appointment>

     

    The Style of "SingleAppointment" means that the appointments will show in a bordered box like the All Day Events (it has the same Style…). The free busy status bar will show on the left just like the All Day Events. If the time is "busy", then no bar will show, and it is assumed that the time is "busy".

     

    You can show a bar here for busy by doing something like the following:

     

                        <Bar Orientation="Left" Visibility="Collapsed" Width="5"

                             BorderThickness="0,0,1,0">

                          <ConditionalFormat Condition="BusyStatus eq 'Busy'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarBusy"

                                             Background="Blue"/>

                          <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarFree"/>

                          <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarTentative"/>

                          <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarOOF"/>

                        </Bar>

     

    The text I added is in green. It checks to se if the time is marked as Busy, and if so then it will do the "Busy" style - which is the default (no bar and it's assumed the time is busy in that case). So I added a different background color and that allows the time to be seen specifically as busy:

     

     

    So that's a neat trick you can add here or in other templates where you want to see the time marked as busy when it is busy along with the other states for the status.

     

    Okay - for the rest of the appointment data to show, it is very similar to the "List" statement in the previous daily example:

     

                        <Content Orientation="Fill" Margin="2,0,2,0" Separator="116"

                                 FontSize="6pt" SeparatorFontFamily="Wingdings"

                                 TextWrapping="WrapWithOverflow">

                          <ContentElement Source="CategorySymbols"/>

                          <ContentElement Source="OddTimes" FontSize="6pt"/>

                          <ContentElement Source="Subject" FontSize="6pt"

                                          FontWeight="Bold"/>

                          <ContentElement Source="Location" FontSize="6pt"/>

                          <ContentElement Source="CategorySymbols"/>

                        </Content>

     

    It will show Category Symbols (dots) on the front and back of the other appointment data. It will show the Subject and Location, and it will also show "odd times" if the times do not align with the TimeSlot MinorUnit setting. In this template it is set to 30, so any appointment not starting or ending on the hour or half hour will have the times for the appointment displayed - like:

     

     

    Since the above is a 15 minute meeting - it ends at an "odd time" and so the start and end times show on it.

     

    That is it for this template. If there is something you want in your customized template that might not be shown here - you can always expand out a template that has what you are wanting, and incorporate it.

     

    I have attached the Content.xml that has these modifications to this post - I hope it will help with a similar template for you. 

  • In case Calendar Printing Assistant (CPAO) just won't work for you...

    My co-worker posted a how-to on a different way to do printing with a Word template. So if CPAO just won't do what you want, then you might be able to use the Word template as a solution that will work for you...

    http://blogs.technet.com/b/sbradley/archive/2010/06/24/the-howto-and-sample-template-for-custom-outlook-calendar-templates.aspx

     

  • CPAO: Editing a Daily Template - Part 1

     

    I have had several customers request a Daily Template that fits data on a 3x5 index card sized printout.

    I have done a few different iterations of this layout to customize things for each particular customer - but I wanted to give an example of this since it seems to be a popular request.

     

    Here is the calendar data as seen in Outlook 2007:

     

     

    Here is what the 3x5 template I have modified/created in Calendar Printing Assistant (CPAO) looks like:

     

    I started with the "Standard Day 03 Letter" (Day_StandardDay03.catx) and modified it to make this new template. I actually really just removed a lot from the original template, made some things smaller, etc. so that items would fit in a 3x5 printout.

     

    You could change the size of the paper to use on the Standard Day 3 template to an Index Card 3x5" - but the printout is difficult to read when it is set to 3x5:

     

    As you can see - the Standard Day 3 template is really  designed to be printed out on a standard 8.5" x 11" sheet of paper, and not an index card.

     

    I will go through some of the details of what was changed - and I encourage you to also go through the material covered in the series I did on modifying the Monthly template. It covers things that I will not go over again here. In general - I removed all the month thumbnails, set the main header to be smaller and to print out the Day information, removed the "Appointments" header, removed the timeline, and set the appointments to print with the Category (signified with a colored dot), start and end time, subject, and location.

     

    You could leave the timeline in there on the 3x5 template, and I will show a sample of that in a future post.

     

    Here is a listing of the Content.xml for this template:

     

    <?xml version="1.0" encoding="utf-8"?>

    <!-- Copyright (c) 2007, Microsoft Corporation. All rights reserved. -->

    <!-- Daily 3x5 -->

    <Template xmlns="http://schemas.microsoft.com/2005/xcal" Version="1.0.0">

      <Display>

        <Page RowSetting="0.15in,0.30in,0.0in,*,0.30in"

              ColumnSetting="0.20in,*,0.20in" Style="StandardText">

          <!-- Background -->

          <Rectangle Row="0" Column="0" RowSpan="5" ColumnSpan="3"

                     Style="PageBackground"/>

          <!-- Day Header A-->

          <Grid Row="1" Column="1" RowSetting="Auto" ColumnSetting="*,*,*"

                Style="LevelOneTitle" Padding=".04in">

             <!-- Day/Date -->

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

                           #[@TemplateDate_DayNumber], #[@TemplateDate_YearNumber]"

                           Margin="2" FontSize="8pt" Style="AccentText"/>

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

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

          </Grid>

          <!--Day Slot-->

          <DayCalendar Row="3" Column="1">

            <DayFormat>

              <DockPanel Style="LevelOneParent">

                <Grid Orientation="Fill" Style="LevelOneBody" RowSetting="*,Auto"

                      ColumnSetting="*">

                  <DockPanel Row="0" Column="0">

                    <SingleAllDayArea Orientation="Top" MinSize="20" MaxSize="92"

                                      Padding="2">

                      <AllDayAppointment Height="14" Margin="5,0,5,1"

                                         Style="SingleAppointment">

                        <Bar Visibility="Collapsed" Orientation="Left" Width="3"

                             BorderThickness="0,0,1,0">

                          <ConditionalFormat Condition="BusyStatus eq 'Free'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarFree"/>

                          <ConditionalFormat Condition="BusyStatus eq 'Tentative'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarTentative"/>

                          <ConditionalFormat Condition="BusyStatus eq 'OutOfOffice'"

                                             Visibility="Visible"

                                             Style="SingleAppointmentBarOOF"/>

                        </Bar>

                        <Content Orientation="Fill" Margin="2,0,2,0"

                                 HorizontalAlignment="Center" Separator="116"

                                 SeparatorFontFamily="WingDings" FontSize="6pt"

                                 TextWrapping="NoWrap">

                          <ContentElement Source="CategorySymbols"/>                     

                          <ContentElement Source="Subject" FontSize="6pt"

                                          FontWeight="Bold"/>

                          <ContentElement Source="Location" FontSize="6pt"/>

                          <ContentElement Source="CategorySymbols"/>

                        </Content>

                      </AllDayAppointment>

                    </SingleAllDayArea>

    <List Orientation="Fill" FontSize="8pt" ShowEmptyRow="true"

          MaxRowWrap="5" RowSize="16" TypeFilter="AppointmentsTasks">

      <Columns>

                <Column Width="*" ShowDuplicates="True" Left="1" Top="2"

                        Right="1" Bottom="3" >

                        <Sources>

                    <Source Name="CategorySymbols"/>

                    <Source Name="StartTime" Format="t" StartSeparator=""/>

                    <Source Name="EndTime" Format="t" StartSeparator="-"/>

                    <Source Name="Subject" StartSeparator=": "/>

                    <Source Name="Location" StartSeparator=" ("

                                            EndSeparator=")"/>

                         <Source Name="CategorySymbols"/>

                  </Sources>

                </Column>

            </Columns>

    </List>

                   </DockPanel>

                 </Grid>

              </DockPanel>

            </DayFormat>

          </DayCalendar>

          <!--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="6pt"/>

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

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

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

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

          </Grid>

        </Page>

      </Display>

    </Template>

     

    Moving down through this listing - things I changed are in green. I also removed a bunch of code from the original Standard Day 3 template. It would be a good exercise to expand out that template (Day_StandardDay03.catx) and compare the Content.xml from that template with my modifications here.

     

    Starting from the top - I modified the page to have a bit smaller margins, and made the header size .30in instead of "Auto":

    <Page RowSetting="0.15in,0.30in,0.0in,*,0.30in" ColumnSetting="0.20in,*,0.20in"

              Style="StandardText">

     

    Then in the header itself - I set the day and date to display using:

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

                           #[@TemplateDate_DayNumber], #[@TemplateDate_YearNumber]"

                           Margin="2" FontSize="8pt" Style="AccentText"/>

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

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

     

     

    The variables used in red above - like #[@TemplateDate_MonthName] - can be used to display data as needed - like the month name, day number, year number, and day name. I actually went and opened other templates to find some of the variables I used here, so if there is something you are wanting, it might pay to look at other templates to see if one has what you want, then crack open that template and see what variable is used.

     

    In the AllDayAppointments area I set a smaller height for each all day appointment, I set the mininmum size to just over the size of one appointment - and made room for about 6 all day appointments using the MaxSize setting:

    <SingleAllDayArea Orientation="Top" MinSize="20" MaxSize="92" Padding="2">

        <AllDayAppointment Height="14" Margin="5,0,5,1" Style="SingleAppointment">

     

    I also added a colored dot to show the color category using the CategorySymbols source element. So if a category is selected for the all day event - and that shows before and after the appointment:

    <ContentElement Source="CategorySymbols"/>                     

    <ContentElement Source="Subject" FontSize="6pt" FontWeight="Bold"/>

    <ContentElement Source="Location" FontSize="6pt"/>

    <ContentElement Source="CategorySymbols"/>

     

     

    In this particular case - a category with a blue color was selected. I also set all the font sizes to be smaller so that the text would fit in the appointment area.

     

    Then for the rest of the appointments I changed out the CompactList for a plain regular List. You can read  more about using a List in place of a CompactList and some differences, etc. in a previous post.

     

    In the original template I changed out:

    <CompactList Row="1" Column="0" Padding="2" MinHeight=".5in" MaxHeight="1.2in"

                 StartHour="8" EndHour="18" TimeWindow="Exclude" TypeFilter="Appointments"

                 FontSize="8pt" BorderThickness="0,1,0,0"

                 BorderBrush="style!SingleLineStroke"/>

     

    And put the following in its place:

    <List Orientation="Fill" FontSize="8pt" ShowEmptyRow="true" MaxRowWrap="5"

          RowSize="16" TypeFilter="AppointmentsTasks">

      <Columns>

          <Column Width="*" ShowDuplicates="True" Left="1" Top="2" Right="1"

                  Bottom="3" >

               <Sources>

                    <Source Name="CategorySymbols"/>

                    <Source Name="StartTime" Format="t" StartSeparator=""/>

                    <Source Name="EndTime" Format="t" StartSeparator="-"/>

                    <Source Name="Subject" StartSeparator=": "/>

                    <Source Name="Location" StartSeparator=" (" EndSeparator=")"/>

                    <Source Name="CategorySymbols"/>

               </Sources>

          </Column>

       </Columns>

    </List>

     

     

    This displays the appointments with the categories signified on them with the colored dots. It has the start and end times listed on them since there is no time line, and the subject and location. The "StartSeparator" and "EndSeparator" is used to put - well - separators between these elements, and you just put in the text and/or spaces that you want for these separators.

    Please note here that the last appointment does have 2 categories assigned to it - and so both categories   are signified with the orange and green dots. It is a private appointment - and CPAO will place the "lock" symbol next to it automatically when it is a private appointment.

     

    Lastly - I also modified the Metadata.xml file for this template. More info on why to do this is in a previous post.

     

    Here is the listing for that file:

     

    <Metadata xmlns="http://schemas.microsoft.com/2005/xcal" Version="1.0.0">

        <Name>Daily 3x5</Name>

    <TimeUnit>Day</TimeUnit>

    <PageSizeSelectionIndex>Index Card</PageSizeSelectionIndex>

    <PageHeight>5in</PageHeight>

    <PageWidth>3in</PageWidth>

    <PageOrientationSelectionIndex>Portrait</PageOrientationSelectionIndex>

    <PageRow>1</PageRow>

    <PageColumn>1</PageColumn>

    <Thumbnail>DefaultPreview.gif</Thumbnail>

    <Tasks>false</Tasks>

    <Appointments>true</Appointments>

    <SideBySide>false</SideBySide>

    <PageCount>1</PageCount>                        

    <TemplateId>75</TemplateId>

    <CompanyId>1</CompanyId>

    </Metadata>

     

    The changes here will allow this template to show in CPAO as "Daily 3x5 Index Card". And by default the page size will be set to 3x5" when loading the template.

     

    I attached the Content.xml for this modified template so that you can use it / compare it / etc.