Application.FilePageSetupCalendarTextEx Method (Project)

Formats the text of calendar views for printing, where the text color can be a hexadecimal value.

Syntax

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

expression An expression that returns 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 a hexadecimal RGB value, where red is the last byte. For example, the value &;H01FFFF is yellow.

Return Value

Boolean

Remarks

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

Note FilePageSetupCalendarTextEx works only for printing calendar views.

Example

The following example formats monthly titles in red for printing.

Sub File_PageSetupCalendarText() 
 
    'Activate the Calandar view. 
    ViewApply Name:="&;Calendar" 
 
    FilePageSetupCalendarTextEx Item:=pjMonthlyTitles, Color:=&;0101FF 
    FilePrint 
End Sub