
Outlook Web Access Web Parts Syntax
Exchange 2007 Outlook Web Access has a new URL format to use for requests to the /owa virtual directory. These requests can be made by typing a URL directly into a Web browser or by embedding the URL in a Web application, such as an Office SharePoint Server page.
Outlook Web Access Web Parts can be used to create URLs of varying complexity. A simple Web Part URL can be used to open the Inbox of any mailbox. A more complex Web Part URL could be used to specify the mailbox to open, the folder within that mailbox to open, and the content view to use.
For example, the simple Web Part URL https://<server name>/owa/?cmd=contents will open the Inbox of the mailbox that is determined by the user's logon. The more complex Web Part URL https://<server name>/owa/<SMTP address>/?cmd=contents&f=inbox%2fProjects&view=by%20subject will open the mailbox that is specified by the SMTP address to the subfolder Projects, sorted by subject.
Depending on the security measures that have been applied to your network, you may have to configure encoding for the Web Parts URL. After you configure the encoding, the code behind the UI will create the URL by using the URL-encoded parameters. URL-encoded parameters use %20 in place of spaces and %2f in place of the path delimiter "/". All examples in this topic use encoded parameters.
Supported Microsoft Exchange 2000 and Exchange 2003 Web Parts are automatically translated to Exchange 2007 Web Parts.
Table 1 lists the parameters of a Web Part and examples of how they are used.
Table 1 Web Part parameters and how they are used
|
URL parameter
|
Description
|
Values and examples
|
|---|
|
Server name and directory (required)
|
The URL of the Outlook Web Access virtual directory.
|
This may be the same URL that users use to log on to Outlook Web Access, for example:
https://<server name>/owa
|
|
Exchange 2007 explicit logon mailbox identification (optional)
|
Any SMTP address that is associated with the mailbox to be opened.
If this section of the URL is missing, the default mailbox of the authenticated user is opened.
If no additional parameters are specified, the default behavior is to open the Inbox.
|
To open the mailbox with the SMTP address tsmith@fourthcoffee.com, use:
https://<server name>/owa/tsmith@fourthcoffee.com
|
|
cmd (required if you are specifying any parameter other than the explicit logon mailbox identification)
|
?cmd=contents displays the Outlook Web Access Web Part that is specified by the parameters instead of the full Outlook Web Access user interface.
|
If no mailbox is specified, this parameter follows the server directory:
https://<server name>/owa/?cmd=contents
If a mailbox is specified, this parameter follows the explicit mailbox identification:
https://<server name>/owa/<SMTP address>/?cmd=contents
If no additional parameters are specified, the default behavior is to open the Inbox.
|
|
id (optional)
|
The folder ID of the folder from which the Web Part should display contents. This can be obtained by using Web services and can be used in applications to dynamically select which folder to open.
|
The folder ID is the Base64-encoded PR_ENTRY_ID of the folder:
https://<server name>/owa/?cmd=contents&id=<PR_ENTRY_ID>
|
|
f (optional)
|
A string that specifies the mailbox folder to be shown in the Web Part. The Web Part URL may have to be written by using URL encoding so that it can pass through firewalls.
When you use URL encoding, a space becomes %20, and a path delimiter (/) becomes %2f.
The folder hierarchy should start from the mailbox root.
This folder path can point to ordinary folders or search folders.
|
To open the subfolder Projects in the Inbox, use:
https://<server name>/owa/?cmd=contents&f= inbox%2fprojects
|
|
module (optional)
|
This parameter can be used to specify any of the four default folders without knowing the localized name.
|
Values for the module parameter are not case sensitive, and include the following:
-
Inbox
-
Calendar
-
Contacts
-
Tasks
-
Publicfolders
To open the calendar of a mailbox regardless of localization:
https://<server name>/owa/?cmd=contents&module=calendar
|
|
view (optional)
|
This parameter specifies the view to be displayed for the folder.
The default views when this parameter is not present are as follows:
-
Calendar Daily
-
Messages Messages
-
Contacts Two%20Line
-
Tasks By%20Due%20Date
Note:
The strings for the default views are automatically URL encoded.
The default sort for a view is the way the folder would be sorted if it was opened in the Outlook Web Access client.
Exchange 2003 Web Part views that are not supported in Exchange 2007 are as follows:
-
Contacts Address card and detailed address card
-
Messages Unread by conversation topic and sent to.
The strings identifying the views are not localized and not case sensitive.
|
The views available vary according to the folder type.
Calendar views:
-
Daily The daily calendar view
-
Weekly The weekly calendar view
Message views:
-
Messages One line message view, with default sort
-
By%20Sender One line message view sorted by From with sender names that begin with "a" on top
-
By%20Subject One line message view sorted by Subject with subjects that begin with "a" on top
-
By%20Conversation%20Topic Conversation View, available only in Outlook Web Access Premium
-
Two%20Line Two line message view, with default sort, available only in Outlook Web Access Premium
-
Monthly The monthly calendar view
Contact Views:
-
Phone%20List One line contact view, with default sort
-
Two%20Line Two line contact view with default sort, available only in Outlook Web Access Premium
Tasks:
-
By%20Due%20Date One line contact tasks view with default sort
-
By%20Subject One line contact view sorted by subject, with a on top
https://<server name>/owa/?cmd=contents&f=Calendar&view=Weekly will display the requested calendar in Weekly view.
|
|
d, m, y (optional)
|
Specifies the date for which the calendar should be displayed. These parameters can be entered in any order and can be used singly or together.
If any of these parameters are not specified, the default values are the current day, month, and year values. For example, if the current day is May 3, 2007 and you specify a month value of "9" for September, the date displayed will be September 3, 2007.
|
The valid values for the data parameters are as follows:
d=[1-31]
m=[1-12]
y=[four digit year]
To open a calendar to the date May 3, 2007, you would use https://<server name>/owa/?cmd=content&f=calendar&view=daily&d=3&m=5&y=2007
|
|
part (optional)
|
Specifies that Outlook Web Access should display a smaller Web Part.
|
When you use Web Parts to access Outlook Web Access content, the UI that is displayed will be smaller than the full Outlook Web Access UI. The part parameter reduces the UI further. This example shows the tasks list in the smallest Web Part format:
https://<server name>/owa/?cmd=contents&f=tasks&part=1
Figures 1 and 2 show the UI that Outlook Web Access will display with and without part=1 applied to the Tasks Web Part.
|
Figure 1 shows the Outlook Web Access Tasks Web Part without the parameter part=1.
Figure 1 Web Part URL without Part=1.gif)
Figure 2 shows the Outlook Web Access Tasks Web Part with the parameter part=1.
Figure 2 Web Part URL with Part=1.gif)
You can use multiple parameters to specify the folder to be displayed and the format to display it in. If more than one folder parameter is used, the precedence order is id, f, and then module. If none of these parameters is present, the Inbox will be shown by default.
Note: |
|---|
|
If a feature has been turned off by using segmentation, that feature will not be available as a Web Part. For example, if the Outlook Web Access calendar has been disabled, you will not be able to access calendars by using Outlook Web Access Web Parts.
|