Project) (Application.FilePageSetupCalendarText 方法
設定行事曆檢視的文字列印格式。
語法
expression。 FilePageSetupCalendarText
( _Name_
, _Item_
, _Font_
, _Size_
, _Bold_
, _Italic_
, _Underline_
, _Color_
)
expression 代表 Application 物件的變數。
參數
名稱 | 必要/選用 | 資料類型 | 描述 |
---|---|---|---|
Name | 選用 | String | 要編輯之行事曆的名稱。 |
Item | 選用 | Long | 要設定格式的文字項目。 可以為其中一個 PjPageSetupCalendarItem 常數。 |
Font | 選用 | String | 字型的名稱。 |
Size | 選用 | Integer | 字型的大小,以點為單位。 |
Bold | 選用 | 布林值 | True 是表示 如果字型是粗體;否則 為 False 。 |
Italic | 選用 | 布林值 | True 是表示 如果字型是斜體格式 ;否則 為 False 。 |
Underline | 選用 | 布林值 | True 是表示 如果字型有加底線;否則 為 False 。 |
Color | 選用 | Long | 文字的色彩。 可以為其中一個 PjColor 常數。 |
傳回值
布林值
註解
使用 FilePageSetupCalendarText 方法沒有任何引數會顯示 [ 文字樣式] 對話方塊。
注意事項
[!注意事項] FilePageSetupCalendarText 只適用於列印行事曆檢視。
若要格式化 Color 可以是十六進位 RGB 值的行事曆文字,請使用 FilePageSetupCalendarTextEx 方法。
範例
下列範例會將月標題的格式設定為紅色,以進行列印。
Sub File_PageSetupCalendarText()
'Activate the Calendar view.
ViewApply Name:="&Calendar"
FilePageSetupCalendarText Item:=pjMonthlyTitles, Color:=pjRed
FilePrint
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。