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
Dim HttpWebRequest
sHREF = "https://myexserver/exchange/Administrator/Inbox/testabcd.EML"
sUserName = "Administrator"
sPassword = "test"
set HttpWebRequest = CreateObject("microsoft.xmlhttp")
HttpWebRequest.Open "DELETE", sHREF, False, sUserName , sPassword
HttpWebRequest.Send
sResponse = HttpWebRequest.ResponseText ' Returns as text
Set HttpWebRequest = Nothing
wscript.echo sResponse