Mod to Print Category Colors on Calendar Using CPA

Status
Not open for further replies.

First Capital

Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Colors for Appointments - Events - NON ALL DAY EVENTS !

I am editing the Standard Month 01 template.


Trying to print Colors for Single Appointments these are the Smaller 1/2 hour incremental Appointments.




No Colors are showing. They do not carry over from Outlook using versions 2007- 2010


Below i have included the altered code from this Template: Month_StandardMonth01




colors.jpg




I'm getting really good at going back and forthe editing,. so please help me. Pleeeeez.!






colors2.jpg






PHP:
?xml version="1.0" encoding="utf-8"?<!--MonthDayCalendar Sizer-->
     <monthdaycalendar column="1" row="3">
       <monthformat>
         <dockpanel>
           <weekheader format="dddd" fontsize="10pt" height="0.3in" orientation="Top">
           <weekgrid orientation="Fill" unitrestriction="false" numcolumns="7" numrows="Auto">
             
 
 
<spanningalldayarea margin="2" isuniform="false" maxsize="116" minsize="0">
               
 
 
<alldayappointment height="36" margin="2,1,2,0">
                 <bar width="5" orientation="Left" borderthickness="0,0,1,0" visibility="Collapsed">
                   <conditionalformat visibility="Visible" condition="BusyStatus eq 'Free'">
                   <conditionalformat visibility="Visible" condition="BusyStatus eq 'Tentative'">
                   <conditionalformat visibility="Visible" condition="BusyStatus eq 'OutOfOffice'">
                 </conditionalformat>
                 <content fontsize="6pt" orientation="Fill" margin="2,0,2,0" textwrapping="Wrap" separatorfontfamily="WingDings" separator="116" horizontalalignment="Left">
                   <contentelement fontweight="Bold" source="Subject">
                   <contentelement source="Location">
                   <contentelement source="Organizer">
                   <contentelement source="CategorySymbols">
                 </contentelement>
               </contentelement>
             </contentelement>            
           </contentelement>
         </content>
       </conditionalformat>
 
 

       <dayformat>
 
 
<grid height="Auto" columnsetting="*" rowsetting="*">
 
 

 
 
<calendartext column="0" row="0" fontsize="14pt" horizontalalignment="Right" fontweight="Normal" verticalalignment="Bottom" fontfamily="style!FontMajor" text="#[%d]">
             <foreground>
               <solidcolorbrush tint=".7" color="style!mainDark1">
             </solidcolorbrush>
             <conditionalformat condition="DayOfWeek eq 'sun'">
               <foreground>
                 <solidcolorbrush tint=".7" color="style!WeekendColor">
               </solidcolorbrush>
             </foreground>
             <conditionalformat condition="DayOfWeek eq 'sat'">
               <foreground>
                 <solidcolorbrush tint=".7" color="style!WeekendColor">
               </solidcolorbrush>
             </foreground>
           </conditionalformat>
           <dockpanel column="0" row="0">
             <spanningalldayareaplaceholder orientation="Top">
             <compactlist fontsize="6pt" orientation="Fill" typefilter="AppointmentsTasks" padding="1">
           </compactlist>
         </spanningalldayareaplaceholder>
       </dockpanel>
     </conditionalformat></foreground></calendartext></grid></dayformat></conditionalformat></bar></alldayappointment></spanningalldayarea></weekgrid></weekheader></dockpanel></monthformat></monthdaycalendar>
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

I'm looking into it. :)
 

charith

Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

I'm looking into it. :)
Finished looking into it? It's quite surprising that non MVP users are more helpful and knowledable in this forum.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

That's because more non-mvps customize the CPAO than mvps. :) The XML for the templates is poorly documented and it seems only a few hardly souls attempt to edit it and live to tell about it. ;) It's going to get worse if they don't release a version that works with 2013.

I tried using the method here- CPAO: Using Colors for Categories and Private Items - rtopken - Site Home - TechNet Blogs - it works for all day events but I can't figure out how to use it with timed appoint.

this is the all day method (where the category name really is "Red Category" etc).

PHP:
  <AllDayAppointment Height="16" Margin="2,1,2,0" Style="SingleAppointment" Background="White">     
                 
                   <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"/ 
                    <ConditionalFormat Condition="Sensitivity eq 'Private'" Background="Gray"/
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

PHP:
<compactlist fontsize="6pt" orientation="Fill" typefilter="AppointmentsTasks" padding="1" 
            </compactlist
that code is what handles timed appt. it needs replaced with list code - the conditional formatting does not work in the position I have it here -

PHP:
<List Orientation="Fill" FontSize="8pt" ShowEmptyRow="true" MaxRowWrap="5"
     RowSize="16" TypeFilter="AppointmentsTasks"  Background="White" 
                  <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"/ 
                    <ConditionalFormat Condition="Sensitivity eq 'Private'" Background="Gray"/ 
  <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=")"/ 
           </Sources 
      </Column 
   </Columns 
</List
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

BTW, if you use the list orientation code i posted, the dots will be colored - I'm trying to color the background. So it's half working, just not like I want it to.
 

charith

Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

BTW, if you use the list orientation code i posted, the dots will be colored - I'm trying to color the background. So it's half working, just not like I want it to.
I just tried your previous code and it doesn't apply background color somehow. Really appreciate if you can figure out the issue. Thank you.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

Right no background on timed appointments - but the dot should be color coded, if the categories conditional format matches the actual category name.

color-code.png

I repeated the category symbol line twice at the beginning and end.

PHP:
          <Sources 
                <Source Name="CategorySymbols"/ 
<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"/ 
<Source Name="CategorySymbols"/
 

charith

Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

Right no background on timed appointments - but the dot should be color coded, if the categories conditional format matches the actual category name.

View attachment 625

I repeated the category symbol line twice at the beginning and end.

PHP:
That's correct. Dots appear properly with colors. Why non-All day appointments doesn't get background color?

Thanks!

</sources>
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Re: Colors for Appointments - Events - NON ALL DAY EVENTS !

Duh! the category filter has nothing to do with the dot colors. :) They do set the all day appt colors though. I really shouldn't work late at night...

- - - Updated - - -

That's correct. Dots appear properly with colors. Why non-All day appointments doesn't get background color?
It's not supported in the List and/or the AppointmentsTasks format apparently.
 

lay009

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
hi, is there a workaround in Outlook printing assistant indeed so to customize the monthly standard template and print category colours there?

If so, could someone summarize the right solution and possibly share the modified xml file here ? Many thanks !!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
No, not within the templates. Only in the finished product. Sorry.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
No, no updates at this time. I don't expect any improvements to the CPAO going forward, so its unlikely to change.
 

tonybeat

New Member
Outlook version
Outlook 2010 64 bit
Email Account
IMAP
What an update for this? I'd really like to have the background for all appointments not just all day ones. Thanks.
 
Status
Not open for further replies.

Similar threads

Top