Application.FilePageSetupCalendarText method (Project)

Formats the text of calendar views for printing.

Syntax

expression. FilePageSetupCalendarText( _Name_, _Item_, _Font_, _Size_, _Bold_, _Italic_, _Underline_, _Color_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Name Optional String The name of the calendar to edit.
Item Optional Long The text item to format. Can be one of the PjPageSetupCalendarItem constants.
Font Optional String The name of the font.
Size Optional Integer The size of the font in points
Bold Optional Boolean True if the font is bold; otherwise, False.
Italic Optional Boolean True if the font is italic; otherwise, False.
Underline Optional Boolean True if the font is underlined; otherwise, False.
Color Optional Long The color of the text. Can be one of the PjColor constants.

Return value

Boolean

Remarks

Using the FilePageSetupCalendarText method without any arguments displays the Text Styles dialog box.

Note

FilePageSetupCalendarText works only for printing calendar views.

To format calendar text where Color can be a hexadecimal RGB value, use the FilePageSetupCalendarTextEx method.

Example

The following example formats monthly titles in red for printing.

Sub File_PageSetupCalendarText() 
 
 'Activate the Calendar view. 
 ViewApply Name:="&Calendar" 
 FilePageSetupCalendarText Item:=pjMonthlyTitles, Color:=pjRed 
 FilePrint 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.