We're often asked how to create or modify templates for the calendar printing assistant. While there isn't a whole lot you can do to change the templates (without getting deep in editing the XML), its very easy to tweak the text formatting, including font size and position.
The calendar printing assistant uses a template with the extension *.catx. It's stored in the Office template folder, typically located at C:\Program Files\Microsoft Office\Templates. Locate the template you want to edit. Select it, press Ctrl+C then Ctrl+V to make a backup copy in the Templates folder.
How to Edit the Template
Copy the .catx file to My Documents and open it with WinZip by right clicking on the catx file and choosing Open with... then browse for WinZip.exe. (If WinZip is not installed you will need to download and install it). Use the Explorer view in WinZip (View menu, Files by Folder) and locate the Content.xml in the Cal folder. Right click on content.xml and choose Edit to open it in Notepad. When editing is finished, click Save in Notepad (don't close it) then click on the WinZip window and approve the update. Copy the catx back to the Templates folder and approve replacing the catx in the Templates folder.
After copying the edited catx to the Templates folder, select the template to view changes in the CPA. If you need to make more changes, edit the file in Notepad, Save then copy the catx to the Templates folder and reselect the template in CPA.
Faster Editing Method
Give your Windows user account Modify permission to the Templates folder. Make a copy of the template file then edit the original in-place. You can leave the Calendar Printing Assistant open when you edit the catx.
For a step-by-step tutorial of the faster editing method, see My Speedy CPAO Modification Method
To view the changes in CPAO, select a different template then the template you are editing to refresh it.
If you receive an error, select a different template then fix your template and reselect it.
Using Predefined Colors, Fonts and Styles
Before changing colors by editing the XML, use the Color task pane to apply different themes. Colors and Fonts are applied in the XML with Style="style_name".
Notes:
- You can use any zip utility to open the catx file provided it allows you to edit and update the contents.
- Editing the catx from the Templates folder may fail with read only errors.
- If you enter an attribute that is invalid, the CPA will notify you and include the line number where the invalid attribute can be found.
- When adding attributes leave 1 space between the new attribute and the existing attributes.
- Font size of 7 pt is used for the small monthly calendars, footer, and banners.
- I mention the template name I tested the attribute in but they should work in other templates of the same type.
- Don't be afraid to experiment - the worst thing that can happen is you'll need to restore the template copy.
Valid attributes
The following is a list of some of the valid attributes you can use. This list is by no means complete and is only intended to give beginners an idea of what can be changed.
- VerticalAlignment="Bottom" - Valid attributes include Top.
- HorizontalAlignment="Right" - Valid attributes include Left and Center.
- Foreground ="color_name" - This is used for font colors. You can use names (Red) or Hex codes (#00FF00). Any valid CSS color name will probably work. Use this to override theme colors applied using Styles.
- Background="color_name" - As the name suggests, this controls the background color in elements. Use this to override theme colors applied using Styles.
- FontSize="10pt" Any reasonable font size should work. I have not tried other measurements common in CSS code.
- FontWeight="Bold" - Valid attributes include Normal
- Format="dddd" - Name format for the day of the week, dddd is full name (Monday, Tuesday etc) Use ddd for abbreviated format (Mon, Tue, Wed etc) and d for M, T, W format. .
Edit the Day Format
To change the formatting within an individual day cell, look for the DAYFORMAT tag (may be near the end of the file) and locate the CalendarText tag under DAYFORMAT.
For example, in the standard monthly calendar 1 (Month_StandardMonth01.catx), day format is at approx row 87:
<DayFormat> <Grid RowSetting="*" ColumnSetting="*" Height="Auto" Style="LevelLeafParent"> <CalendarText Row="0" Column="0" FontSize="24pt" FontWeight="Bold" Text="#[%d]" FontFamily="style!FontMajor" VerticalAlignment="Bottom" HorizontalAlignment="Right" >
I added VerticalAlignment="Bottom" HorizontalAlignment="Right" to the calendar text row and changed FontSize to 24pt.You can change FontWeight to Normal (other valid weights may be supported, I only tested it with Normal).
The following screen shots show the original and edited template.
Days of the week
These are in the WeekHeader section in the
<WeekHeader Orientation="Top" Height="0.3in" FontSize="10pt" Format="dddd" Style="LevelOneTitle"/>
This screen shot shows the font size used by the day of the week name set at 20 pt. You can use ddd for the Format if you want Mon, Tue etc.
Grid lines
Style="LevelOneBody" in the Month Overview provides the lines visible in each square.
<WeekGrid Orientation="Fill" NumRows="Auto" NumColumns="7" LastRowMerge="2" Style="LevelOneBody">
Month and Calendar Thumbnails Section
do you wish you have more calendar thumbnails or had next month and the month after shown, instead of last month and next month? You can if you edit the Content.xml. This sample is from the standard monthly calendar but the process is similar for every calendar.
In this screen shot, I added 4 calendars, changed the grid background to blue, the font size and color used by the month name after applying a color theme.
For each thumbnail calendar you want to add, you need to add a column setting of 1.3in. Four calendars is pretty much the limit for portrait layout. Add background="color" if you want to change the background color of the Grid row where the Month name and thumbnail calendars are shown.
<Grid Row="1" Column="1" RowSetting="Auto" ColumnSetting="*,1.3in,1.3in,1.3in,1.3in" Style="Header" Padding=".08in" Background="Blue"> <!--Month Title--> <CalendarText Row="0" Column="0" Text="#[@TemplateDate_MonthNameYearNumber]" HorizontalAlignment="Left" FontSize="20pt" FontWeight="Bold" Foreground="Pink"/> <!--Banners-->
Copy and paste the section beginning with
Each calendar needs a different Column number - for 4 calendars, you'll use numbers 1 through 4.
<MonthWeekDayCalendar Row="0" Column="1" Height="1.1in" Width="1.25in" VerticalAlignment="Center" HorizontalAlignment="Center" Style="BannerControl">
Change the DateOffset: -1 is last month, 0 is this month, 1 is next month, 2 is the month after that, etc
<MonthFormat DateOffset="-1"> <DockPanel> <CalendarText Orientation="Top" Text="#[@TemplateDate_BannerMonthNameYear]" Height="0.19in" FontSize="8pt" Style="BannerTitle"/> <WeekHeader Orientation="Top" Height="0.15in" FontSize="10pt" Format="d" Style="BannerWeekHeader"/> <StandardGrid Orientation="Fill" NumColumns="1" NumRows="6" Style="BannerBody" /> </DockPanel> </MonthFormat> <WeekFormat> <DockPanel> <CalendarText Orientation="Left" Width="0.15in" Text="#[@TemplateDate_WeekNumber]" FontSize="5pt" Style="BannerText" HorizontalAlignment="Left" Margin="1,0,0,0"> <ConditionalFormat Condition="ShowWeekNumber eq 'false'" Visibility="Collapsed"/> </CalendarText> <StandardGrid Orientation="Fill" NumRows="1" NumColumns="7" /> </DockPanel> </WeekFormat> <DayFormat> <Banner Text="#[%d]" FontSize="7pt" VerticalAlignment="Bottom" HorizontalAlignment="Right" Style="BannerText"> <ConditionalFormat Condition="OutsideMonthDays eq 'true'" Visibility="Collapsed"/> <ConditionalFormat Condition="DayOfWeek eq 'sun'" Foreground="style!WeekendColor" ForegroundHighlight="style!WeekendColor"/> <ConditionalFormat Condition="DayOfWeek eq 'sat'" Foreground="style!WeekendColor" ForegroundHighlight="style!WeekendColor"/> </Banner> </DayFormat> </MonthWeekDayCalendar>
Footer Text
Each element in the footer (date printer, page number and username) is on a separate line at the end of the XML. You can remove any or all of these elements from the footer by deleting the line (or lines) you want removed or edit the footer to add or change text as shown below.
<!-- 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="Printed on #[@TemplateDocInfo_PrintTime]" HorizontalAlignment="Left" FontSize="7pt" /> <CalendarText Row="0" Column="1" Text="Page #[@TemplateDocInfo_Page]" HorizontalAlignment="Center" FontSize="10pt" Foreground="Blue"/> <CalendarText Row="0" Column="2" Text="Printed by User Acct #[@TemplateDocInfo_UserName]" HorizontalAlignment="Right" FontSize="10pt"/> </Grid>
Show/Hide previous and next month's dates in the Monthly Calendar
UnitRestriction in the following line, from the Standard Month 01 Letter calendar, controls whether or not you'll see the dates of previous or next month. False shows the dates, True hides the dates. If the attribute is not present, the default is True (hide the dates).
<WeekGrid Orientation="Fill" NumRows="Auto" NumColumns="7" Style="LevelOneBody" UnitRestriction="false">
Monthly calendar with Monday - Friday only
If you want to print just the working days in a monthly calendar, you need to edit the following two line by adding UnitFilter="mon..fri" at the end (following the Style parameter). You'll also to change NumColumns="7" to NumColumns="5".
WeekHeader Orientation="Top" Height="0.3in" FontSize="10pt" Format="dddd" Style="LevelOneTitle"
StandardGrid Orientation="Fill" NumRows="1" NumColumns="7" Style="LevelTwoBody"
This is an edited content.xml for the Month_StandardMonthWithWeeks01 template. You can open it, select all, copy and paste into the Content.xml (after selecting all of the text in it).
Mod to Print Category Colors on Calendar Using CPA
In a thread at Outlook Forums, a user asked how to change the calendar color to category color: "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."
DanHoff reports in that thread that you can replace "[CalendarColor]" with "[CategoryColor]" as long as you're using a calendar that shows colors per calendar. You'll make this change in the *.calx, not the template (catx).
More Information
Modify monthly calendar template to show only working days (Outlook Forums)
Calendar Printing Assistant for Outlook(Microsoft)
More at Slipstick.com
- Calendar Printing Assistant Shows Duplicate Entries
- Calendar Printing Assistant: Week Starts on Sunday or Monday
- How to Email Calendar Printing Assistant Calendars
- More CPAO Template Modifications
- My Speedy CPAO Modification Method
- Printing a Calendar Legend
- Using and Editing the My Outlook Calendar Template
Hi Diane
Many thanks for creating this page - fantastically useful.
I have a query... I'm not sure whether you're still active in this area, but "nothing ventured, nothing gained"...
I'm using Outlook (version 1811) in Office 365, and the CPA works well. However, I don't seem to be able to change the Day Format for some templates.
I followed your instructions to the letter for the template "Month_StandardMonth01.catx" and they worked fine. When I try to use the same method for one of the templates with an image, eg "Month_CustomImageMonth04.catx" or "Month_MonthImages.catx", the program seems to completely ignore the changes to the day format - I can't change either the font size or the alignment.
I've double and treble checked, making sure the changes have been properly written to the catx file etc, all to no avail. I even tried rebooting just in case.
If you're able to either confirm that changing the day format is not possible fr these templates, or even better tell me how to make it work, I'd be really, really grateful !
Many thanks.
I'll have a look at the templates.
Is CPA really working with Outlook? It hadn't worked with Outlook 2016 for a very long time (if ever).
Is there a way to change the date order in the Week with 2-day column to read vertically rather than horizontally? So confused why they would have a horizontal format? The week list 2 is the format I am looking for, but on one page. Thank you. PS I can exit .XML file, but not sure what to edit.
Hello,
I found this site very helpful. I was able to modify the Month_standardMonth01.catx template via instructions to change [content_types].xml. However, I cannot seem to change the font size of the appointments. I have changed EVERY font size in the file, and nothing changes the appointment font size. The only appts I can change are the all day appointments. I am trying to print a combined care calendar for Mom and Dad. The font size is so small my parents won't be able to read the appointments. Any help would be appreciated.
Q: in CPAO, can i print participants of meeting, instead of organizer ?
Do you know the list of value of ContentElement ?
Thks
To the best of my knowledge, no, but i haven't looked at CPAO in a very long time. I'll need to download a copy to double check.
My computer just arbitrarily started printing the date headings in the calendar in Outlook very, very tiny. How can we get this to, at least be size 12 again? When I go into "page set up," it is not recognizing any change to the font or the font size. Please help.
Which version of Outlook?
This is monday, tues, wed, etc? Do they look like the correct size in the calendar? (Outlook will pick some fonts up from the display and use in printing.)
Are you using the calendar printing assistant addin or using Outlook's built-in print command? ?
HI Diane
I sent a comment on sunday and dont see it listed.
It is about the times column in the weekly template.
I included a link to my google drive file. If I made a mistake in the comment please tell me what you need.
Regards
I don't see it listed here either. It's possible the link made it look like spam - and that gets emptied every sunday night. If you still need help, please repost.
I'm trying to increase the font size for the appointments on the month with 2 month columns template. Currently the printouts are just too small to read.
I've been able to find the .catx file and open it to edit with 7zip. The .xml file opens in notepad and I can change the font size but when I come to save it I'm not sure how. When I browse the files in the templates folder I can only see .catx files so I'm not sure how to save the .xml file.
Also.... which fontsize do I change? I'm guessing it's the 5pt one as that's ludicrously small but I'm not sure at all.
You need to read through the xml and try to figure out what the font size applies to. 5pt sounds like it might be the last month/next month thumbnail calendars (but i could be wrong).
If 7zip works like WinZip, and you open the xml directly in the zip (rather then exporting), saving it should save it back to the zip.
Does Microsoft plan to provide a version of CPA for Outlook 2016? If yes, when? If not, why not?
Microsoft has not released a version after Outlook 2010, is there a reason why?
No, they do not plan to update it, however, it should work if you follow the instructions here (at least according to Microsoft, although it's not working for me).
https://support.microsoft.com/en-us/kb/2898576
Well, it's working for me now - after a reboot.
Diane,
thank you for the response and the confirmation. I followed the KB document and was able to install CPA on my W10(64)/O2016 PC.
Upon starting CPA, however, it crashed Outlook and displayed the following error message:
"Cannot connect to Microsoft Office 2007. Please restart Microsoft Office 2007 and Calendar Printing Assistant. Original Microsoft Office 2007 error message: The server threw an exception. (Exception from RESULT: 0x80010105 (RPC_E_SERVERFAULT))"
CPA seems to work, but I doubt if it will pull up a calendar from Outlook (2016). Besides, the crash (of Outlooks) leaves behind the tmp files preventing Outlook from opening up again. I have to reboot, remove those tmp files and only then can I start up Outlook.
Any suggestions?
Thanks in advance.
Pradeep.
Did you restart Outlook? Are you using 32bit Outlook or 64bit? It only works (pulls events from the calendar) with 32bit Outlook.
I have restarted Outlook and the PC several times. I am using 32bit Outlook.