Share via


TextRange.InsertDateTime Method

Inserts the date and time in the specified text range. Returns a TextRange object that represents the inserted text.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Function InsertDateTime ( _
    DateTimeFormat As PpDateTimeFormat, _
    InsertAsField As MsoTriState _
) As TextRange
'Usage
Dim instance As TextRange
Dim DateTimeFormat As PpDateTimeFormat
Dim InsertAsField As MsoTriState
Dim returnValue As TextRange

returnValue = instance.InsertDateTime(DateTimeFormat, _
    InsertAsField)
TextRange InsertDateTime(
    PpDateTimeFormat DateTimeFormat,
    MsoTriState InsertAsField
)

Parameters

Return Value

Type: Microsoft.Office.Interop.PowerPoint.TextRange

Remarks

The DateTimeFormat parameter value can be one of the following PpDateTimeFormat constants:

ppDateTimeddddMMMMddyyyy

ppDateTimedMMMMyyyy

ppDateTimedMMMyy

ppDateTimeFormatMixed

ppDateTimeHmm

ppDateTimehmmAMPM

ppDateTimeHmmss

ppDateTimehmmssAMPM

ppDateTimeMdyy

ppDateTimeMMddyyHmm

ppDateTimeMMddyyhmmAMPM

ppDateTimeMMMMdyyyy

ppDateTimeMMMMyy

ppDateTimeMMyy

The InsertAsField parameter value can be one of the following MsoTriState constants:

Constant

Description

msoFalse

The default.

msoTrue

Updates the inserted date and time each time the presentation is opened.

See Also

Reference

TextRange Interface

TextRange Members

Microsoft.Office.Interop.PowerPoint Namespace