UseFormat 属性

       

决定日期和时间对象是否包含自动更新的信息。可读写。MsoTriState 类型。

说明

此属性仅应用于 HeaderFooter 对象,该对象代表日期和时间(由 DateAndTime 属性返回)。如果希望使用 Format 属性来设置或返回日期和时间格式,请将日期和时间的 HeaderFooter 对象的 UseFormat 属性设置为 True。如果希望设置或返回固定日期和时间的文本字符串,请将 UseFormat 属性设置为 msoFalse

示例

本示例将当前演示文稿的幻灯片母版中的日期和时间设为自动更新,并将日期和时间格式设为显示小时、分钟和秒。

Set myPres = Application.ActivePresentation
With myPres.SlideMaster.HeadersFooters.DateAndTime
    .UseFormat = msoTrue
    .Format = ppDateTimeHmmss
End With