Table of contents
TOC
折叠目录
展开目录

Application.FilePageSetupCalendarTextEx 方法 (项目)Application.FilePageSetupCalendarTextEx Method (Project)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

设置日历视图的文本格式以进行打印,其中的文本颜色可以是十六进制值。Formats the text of calendar views for printing, where the text color can be a hexadecimal value.

语法Syntax

表达式FilePageSetupCalendarTextEx(* 名称字体大小粗体倾斜添加下划线颜色)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
NameName可选OptionalStringString要编辑的日历的名称。The name of the calendar to edit.
ItemItem可选OptionalLongLong要设置格式的文本项。可以是PjPageSetupCalendarItem常量之一。The text item to format. Can be one of the PjPageSetupCalendarItem constants.
FontFont可选OptionalStringString字体的名称。The name of the font.
SizeSize可选OptionalIntegerInteger字体的大小,以磅为单位The size of the font in points
BoldBold可选OptionalBooleanBoolean如此如果字体格式为加粗。否则为True if the font is bold; otherwise, False.
ItalicItalic可选OptionalBooleanBoolean如此如果指定字体为斜体。否则为True if the font is italic; otherwise, False.
UnderlineUnderline可选OptionalBooleanBoolean如此如果字体带下划线;否则为True if the font is underlined; otherwise, False.
ColorColor可选OptionalLongLong文本的颜色。可以是十六进制的 RGB 值,红色也是最后一个字节。例如,值&;H01FFFF 为黄色。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

BooleanBoolean

注解Remarks

使用不带任何参数的FilePageSetupCalendarTextEx方法将显示文本样式对话框。Using the FilePageSetupCalendarTextEx method without any arguments displays the Text Styles dialog box.

请注意FilePageSetupCalendarTextEx只适合于打印日历视图。NoteFilePageSetupCalendarTextEx 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
© 2018 Microsoft