Share via


Duration (UserOofSettings)

Last modified: May 24, 2010

Applies to: Exchange Server 2007 | Exchange Server 2010

The Duration element specifies the duration that the out of office (OOF) status is enabled if the OofState element is set to Scheduled.

<Duration>
   <StartTime/>
   <EndTime/> 
</Duration>

Duration

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

Element

Description

StartTime

Represents the start of the time span set with an OOF status. This element is required.

EndTime

Represents the end of the time span set with an OOF status. This element is required.

Parent Elements

Element

Description

UserOofSettings

Specifies the OOF settings.

The following is the XPath expression to this element:

/SetUserOofSettingsRequest/UserOofSettings

OofSettings

Contains the OOF settings.

The following is the XPath expression to this element:

/GetUserOofSettingsResponse/OofSettings

OutOfOffice

Defines the Out of Office (OOF) response message and a duration time for sending the response message for a mailbox.

Remarks

The Duration type is also the type for the DetailedSuggestionsWindow, TimeWindow, and OutOfOffice elements.

The schema that describes this element is located in the IIS virtual directory that hosts Exchange Web Services of the Client Access server.

Example

The following example of a SetUserOofSettings Operation request sets the OofState to Enabled, the internal and external OOF messages, and sets the duration of OOF for 10 days.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SetUserOofSettingsRequest xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
      <Mailbox xmlns="https://schemas.microsoft.com/exchange/services/2006/types">
        <Name>David Alexander</Name>
        <Address>someone@example.com</Address>
        <RoutingType>SMTP</RoutingType>
      </Mailbox>
      <UserOofSettings xmlns="https://schemas.microsoft.com/exchange/services/2006/types">
        <OofState>Enabled</OofState>
        <ExternalAudience>All</ExternalAudience>
        <Duration>
          <StartTime>2005-10-05T00:00:00</StartTime>
          <EndTime>2005-10-25T00:00:00</EndTime>
        </Duration>
        <InternalReply>
          <Message>I am out of office.  This is my internal reply.</Message>
        </InternalReply>
        <ExternalReply>
          <Message>I am out of office. This is my external reply.</Message>
        </ExternalReply>
        <SetByLegacyClient>false</SetByLegacyClient>
      </UserOofSettings>
    </SetUserOofSettingsRequest>
  </soap:Body>
</soap:Envelope>

Element Information

Namespace

https://schemas.microsoft.com/exchange/services/2006/types

Schema Name

Types schema

Validation File

Types.xsd

Can be Empty

False