Dan's WebDAV 101

This blog covers Messaging API development for Exchange and Outlook. My name is Daniel Bagley, I'm on the Messaging Developer Team.

Browse by Tags

Tagged Content List
  • Blog Post: HOWTO: VB/CDO 1.21 - Cancel a Recurring Meeting using a single Recurrance

    ' This code finds an meeting occurance and uses it to cancel the entire meeting series and ' have "Cancelled:" in front of the subject lines on the update messages sent to the recipient(s). ' To use: ' Create a recurring meeting inside the date/time range below with the subject "testabc". ' Invite an...
  • Blog Post: HOWTO: VB - Reading Delegates WebDAV Sample

    Private Sub Command1_Click() '===================================================== 'DoXML takes the href to a document 'and returns the MAPI PR_ENTRYID property expressed in 'a hexadecimal string format such as is used by CDO 1.21 'Function DoXML(strHref) Dim objX Dim objXMLdoc Dim objNode Dim strR...
  • Blog Post: Howto: VB - An example to create a public folder with storage limit settings.

    In this example, the following properties are set during the folder creation. outlookfolderclass contentclass The warning limit in KB Prohibit Post at (KB). Maximum item Size (KB) addressbookdisplayname isreadonly ishidden When reading and setting certain properties, it’s necessary to use the exchange...
  • Blog Post: HOWTO: Write a file using VBScript

    '------------------------------------------------------------------------------- ' WriteFileText - Used to write an item to a file in a folder. ' Parameters: ' sFile - The file to read ' ' Returns: ' A string containing the content of the file. '------------------------------------------------------...
  • Blog Post: Howto: VBScript - Read a file

    '----------------------------------------------------------------------------------- ' ReadFileText - Used to read a file in a folder. ' Parameters: ' sFile - The file to read ' ' Returns: ' A string containing the content of the file. '---------------------------------------------------------------...
  • Blog Post: HOWTO: Send Email With Attachment Using VB and WebDAV

    To send an email with WebDAV, you will you will need to create/recreate the item with a WEBDAV PUT using the MIME of the message. It gets tricky when working with attachments. To get around the complexity of sending an email with an attachment, you may want to look at using CDOSYS to build the message...
  • Blog Post: Howto: WebDAV X-MS-ENUMATTS using VBScript to enumerate attachments

    ' This example shows how to enumerate attachments on a message. X-MS-ENUMATTS will ' return phantom urls to attachments on the message. These URLs can be used with GET ' and DELETE (starting with Exchange 2003 SP1). ' For listing and reading an attachment, you will first need to get a list of attachments...
  • Blog Post: Howto: WebDAV COPY using VBScript

    ' This example shows how to do a COPY of a message to a folder. 'NOTE: ' • Copying or Moving items across stores is not supported (that includes maiboxes) ' • You will get a 404 (Resource Not Found) if the source item does not exist. ' • A status of 204 (No Content) will be returned if the destination...
  • Blog Post: Howto: WebDAV MOVE using VBScript

    ' This example shows how to do a MOVE of a message to a folder. 'NOTE: ' • Copying or Moving items across stores is not supported (that includes maiboxes) ' • You will get a 404 (Resource Not Found) if the source item does not exist. ' • A status of 204 (No Content) will be returned if the destination...
  • Blog Post: Howto: WebDAV PUT using VBScript

    ' This example shows how to do a PUT of a message to a folder. What is being written with a PUT would ' be the MIME of a message and such MIME can also contain the MIME of the message. PUT works against ' messaging items directly such as mail messages. It cannot be used to add an attachment without ...
  • Blog Post: Howto: WebDAV GET using VBScript

    'The example below demonstrates how to do a WebDAV GET. ' GET works against items and attachments. When used against an item, it give you ' the mime stream of both the message and attachment. You cannot get the mime of only the message ' if there are attatchments on that message. Use X-MS-ENUMATTS to...
  • Blog Post: Howto: WebDAV DELETE using VBScript

    'The example below demonstrates how to do a WebDAV PROPPATCH. ' DELETE works against folders and items. This sample shows how to delete a single message. ' NOTE: In versions of Exchange prior to 2003 SP1, you cannot delete an attachment with WebDAV. dim sHREF dim sUserName dim sPassword dim sResponse...
  • Blog Post: Howto: WebDAV PROPFIND using VBScript

    'The example below demonstrates how to do a WebDAV PROPFIND. Note: PROPFINDs are non-conditional. Use a SEARCH for reading properties conditionally. dim sHREF dim sUserName dim sPassword dim sResponse Dim HttpWebRequest dim sReq ' Body Proppatch statement sHREF = " https://myexserver/exchange...
  • Blog Post: Howto: WebDAV SEARCH with range headers using VBScript

    'The example below demonstrates how to do a WebDAV SEARCH with range headers. Public Function GetItemListXML(sHREF, sUserName, sPassword, sDepth) Dim sQuery ' As String Dim sText 'As String sQuery = "<?xml version='1.0'?>" & _ "<g:searchrequest xmlns:g='DAV:'>" & _ "<g:sql>SELECT...
  • Blog Post: Howto: WebDAV SEARCH using VBScript

    'The example below demonstrates how to do a WebDAV SEARCH dim strExchangeURL dim strApptStartDate dim strUser dim strPassword strUser = "Administrator" strPassword = "test" strExchangeURL = " http://myexserver/exchange/Administrator/Calendar/ " strApptStartDate = "2004-04-09T15:00:00Z" Dim sRet ...
  • Blog Post: Handling results of calling Powershell - Multivalued and string arrays.

    When calling PowerShell from managed code, you need to be aware of what is being returned and to not process properties returned always as strings. When you get information you were not expecting or no info returned from the call, you should look at TypeNameOfValue and see what is returned - this often...
  • Blog Post: HOWTO: VB/OOM - Display a message using Store ID and item ID

    How to display a message in an outlook window using the store id and item id using OOM. CDO 1.21 cannot just display a message without having it being in a state of forward, reply, etc - so OOM is a better solution. 'TODO - set a reference to the outlook object model ' Call DisplayMessage, passing...
  • Blog Post: How to read the Inbox messages and delete attachments over a given size using VB and CDO 1.21

    Below is a sample: Here is an example: ' This example deletes all jpg file attachments over a certain size in an inbox. Const CONST_MAX_JPG_ATTACHMENT = 3000 ' TODO: Change this - max jpg file size Dim sErrorMessage As String Dim objSession As MAPI.Session Dim objAttach As MAPI.Attachment Dim strExServer...
  • Blog Post: HOWTO: VB6/CDO 1.21 - expand a distribution list

    Below is a sample: ' TODO: Create a new VB Project ' TODO: Set a reference to CDO 1.21 ' TODO: Add a button to the form and paste this code in. ' TODO: Change TODO: sections below. Private Sub Command1_Click() Dim objSession As MAPI.Session Dim ObjMessage As MAPI.Message Dim objUseRecips...
  • Blog Post: How to read free/busy information using CDOEX and VBS?

    Below is a .VBS sample... please note that this needs to run from the Exchange server. '--------------------------------------------------------------------------------------------------------- ' getfb.vbs - Get Free/Busy information using CDOEX and VBS ' This code must run from Exchange Server '...
Page 1 of 1 (20 items)