Share via


Getting the HTTP URL of an Item

Getting the HTTP URL of an Item

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. URLs returned in workflow applications are in the file URL format. These URLs can be converted to equivalent HTTP URLs from a workflow script running in privileged mode by co-creating the Exoledb.UrlMapper Component Object Model (COM) object. However, workflow scripts running in restricted mode cannot create COM objects, so you must instead obtain the IExoledbUrlMapper Interface from the WorkflowSession object. For more information about privileged and restricted workflow modes, see Workflow Security Modes.

The following example demonstrates how to convert a file path to an HTTP URL in a workflow action script. Because no COM objects are created, this code can be run from a workflow application running in either restricted or privileged mode. Note that the returned interface is only valid as long as the WorkflowSession is valid.

Function GetHTTPUrl()
  Dim oMap, strFileURL
  strFileURL = workflowsession.fields("DAV:href").Value
  Set oMap = Workflowsession.Properties.Get("IExoledbUrlMapper")
  GetHTTPUrl = oMap.FilePathtoHttpUrls(oMap.exoledbFileUrlToFilePath(cstr(strFileURL)))(0)
  Set oMap = Nothing
End Function				

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.