Mod to Print Category Colors on Calendar Using CPA

Status
Not open for further replies.

jesned71

Member
My apologies if this is on here somewhere already.




For years, I've printed a family calendar and posted it on our refrigerator for the current month. I've used Outlook 2003 to do this. Each family member had a color that surround each listing on the calendar.




I upgrade to Outlook 2007 and WHAM! All these problems. So I do some research and find the Calendar Printing Assistant. Then I find the mods at http://www.slipstick.com/outlook/modify-calendar-printing-assistant-templates/ which are GREAT! Thank you for those.




Now to my only remaining problem. My wife would like the category colors back. There appears to be small colored dots in front of listed appointments, but they are all the same color. I'm hoping there is a way to colorize the entire appointment based on the category colors from Outlook 2007. The all day appointments are colorized, so I'm hoping there is a way to do that for the others, with each person having their own color based on the Outlook 2007 category color.




Thanks for any help on a mod that would allow this to happen.




Jeremy
 

Forum Admin

Senior Member
The dots indicate the calendar the appointment was on - if you'd use separate calendars instead of categories. Not that i recommend it, its usually better to use one calendar and categories.

I haven't checked the templates for categories. I'll take a look at it over the weekend.
 

DanHoff

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
I've performed a limited test with this and it seems as if you can just replace "[CalendarColor]" with "[CategoryColor]" as long as you're using a template that shows colors per calendar.
 

fmillien

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hi,
I know you ran limited test on the "[Calendar Color]" option. Could you please tell me where to look. I checked XML files but could not find the entries.
 

gcs3

Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
Hey! I signed up just to share this. Thanks for all the great info so far.

I've figured out how to set calendar print assistant to print category colours.

In the place where you would type the background colour, type this:

Background="#[CategoryColor]"

You can add it into this line:

<div style='font-family:monospace;font-size:12px;color:#000080;background:transparent'><Appointment Background="#[CategoryColor]" Style="SingleAppointment">
</div
<appointment background="#[CategoryColor]" style="SingleAppointment"></appointment>
 

DanHoff

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hi,

I know you ran limited test on the "[Calendar Color]" option. Could you please tell me where to look. I checked XML files but could not find the entries.
Hi,

I'll go through the steps i went through to get category colors instead of calendar colors. I used the template "Standard week 1" for my test. It shows entries with "calendar color" before modification.

  1. Save a template as a new file (I used the "name.calx").
  2. Rename the file from name.calx to name.zip (it's actually a zipped archive)
  3. Open the zip archive and extract the file "name.zip\Cal\Styles\CalendarDesigns\Standard\CalendarDesign.xml"
  4. Perform "search and replace" with "CalendarColor" into "CategoryColor".
  5. Save the file and put it back into the zip archive.
  6. Rename the archive from name.zip to name.calx.

Regards

/Dan
 

fmillien

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hi,

I'll go through the steps i went through to get category colors instead of calendar colors. I used the template "Standard week 1" for my test. It shows entries with "calendar color" before modification.

  1. Save a template as a new file (I used the "name.calx").
  2. Rename the file from name.calx to name.zip (it's actually a zipped archive)
  3. Open the zip archive and extract the file "name.zip\Cal\Styles\CalendarDesigns\Standard\CalendarDesign.xml"
  4. Perform "search and replace" with "CalendarColor" into "CategoryColor".
  5. Save the file and put it back into the zip archive.
  6. Rename the archive from name.zip to name.calx.

Regards

/Dan
Thank You so much for your time. This was very helpful.

Would you know know to do the same in Month view.
 

fmillien

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hey! I signed up just to share this. Thanks for all the great info so far.

I've figured out how to set calendar print assistant to print category colours.

In the place where you would type the background colour, type this:

Background="#[CategoryColor]"

You can add it into this line:

<appointment background="#[CategoryColor]" style="SingleAppointment"
</appointment>


<appointment background="#[CategoryColor]" style="SingleAppointment"></appointment>
Hi, Where did you find this line? <appointment background="#[CategoryColor]" style="SingleAppointment"> I suspect it may help me display background in Month view.</appointment>
 

gcs3

Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
You can add it in here. Note you are not replacing an entry, you are adding it in.

<div style='font-family:monospace;font-size:12px;color:#000080;background:transparent'> <Appointment Background="#[CategoryColor]" Style="SingleAppointment">
<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="Categories"/>
</Content>
</Appointment>
</TimeSlot></div>

 

fmillien

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
You can add it in here. Note you are not replacing an entry, you are adding it in.

<Appointment Background="#[CategoryColor]" Style="SingleAppointment"
<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="Categories"/
</Content
</Appointment
</TimeSlot


Sorry To bother you. I just can't figure out exactly where to put this line of code I also notice that the closing has </TimeSlot> but open <TimeSlot> is this for a week view or Month view? I'm trying to incorporate this in a month view. Thanks in advance for the help.
 

gcs3

Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
Sure, no worries. So what you are doing is adding in

Background="#[CategoryColor]"

to wherever background colour of appointments can be changed in your template to some flat colour. It may take some experimenting.

The following link has a very detailed example of this, but his method is much more complicated and more easily broken:

https://blogs.technet.com/b/rtopken/archive/2010/07/30/cpao-using-colors-for-categories-and-private-items.aspx

If you see in his though, on the fourth line of code, it says:

Appointment Style="SingleAppointment" Background="White"

So he added in Background="White" to the Appointment line. This will override the appointment colours and make them all white. Instead of doing that, if you put Background="#[CategoryColor]" then it will be category colour instead!

I hope this helps. Let me know.
 

gcs3

Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
Oh I should add that sometimes the changes don't appear until you restart Calendar Printing Assistant.
 

max1967

Member
Hi,

I'll go through the steps i went through to get category colors instead of calendar colors. I used the template "Standard week 1" for my test. It shows entries with "calendar color" before modification.
  1. Save a template as a new file (I used the "name.calx").
  2. Rename the file from name.calx to name.zip (it's actually a zipped archive)
  3. Open the zip archive and extract the file "name.zip\Cal\Styles\CalendarDesigns\Standard\CalendarDesign.xml"
  4. Perform "search and replace" with "CalendarColor" into "CategoryColor".
  5. Save the file and put it back into the zip archive.
  6. Rename the archive from name.zip to name.calx.
Regards

/Dan
So you are saving a calendar in the CPA and editing the file before printing, not editing the template (catx) file ? I'd like to change it in the template so i can just print and be done with it.
 

Forum Admin

Senior Member
Using the standard month 01 template (catx) and replacing the free busy lines with the categories, i have it working on all day events.

<ALLDAYAPPOINTMENT Margin="2,1,2,0" Height="16">(had to remove the < > brackets so it wouldn't render here)

Bar width controls the width of the color.

<BAR BorderThickness="0,0,1,0" Width="25" Orientation="Left"
AllDayAppointment Height="16" Margin="2,1,2,0" Style="SingleAppointment"

Bar Orientation="Left" Width="25" BorderThickness="0,0,1,0"

ConditionalFormat Condition="Categories eq 'AddUtility'" Visibility="Visible" Background="Red"/

ConditionalFormat Condition="Categories eq 'Needs Done'" Visibility="Visible" Background="Blue"/

/bar<CONDITIONALFORMAT Background="Blue" Visibility="Visible" Condition="Categories eq 'Needs Done'" /
</BAR><CONDITIONALFORMAT Background="Blue" Visibility="Visible" Condition="Categories eq 'Needs Done'" /
</BAR>categories.png
 

gcs3

Member
Outlook version
Outlook 2010 64 bit
Email Account
POP3
So I spent quite a bit of time with your content.xml

I can't figure out how to change the colour of the font. I wish they would document their XML library.

But here is a sample of one I got to work.
 

Attachments

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
the font is controlled by the main program - it can probably be changed in the calx if you save the calendar but (AFAIK) it can't be changed in the template... t
 

brettr

Member
Hi all. Thought I'd jump on the back of this thread. I've figured out that I can put a "Background="#FFFFFF"" on my AllDayAppointment to force the background to be white, independent of the calendar printing assistant template being used. However the border color is still whatever is set within the client. I've tried no end of guesses at XML tags to force the border of the multi-day entries to change to Black and all I keep getting is invalid attribute errors. Does anyone know how to change the border colors? Thanks! Brett.
 
Status
Not open for further replies.
Top