Howto: Read OOF info using EWS and VBScript against an Exchange 2010 SP1

‘ Here is a code sample showing how to read OOF info using EWS from VBScript against an Exchange 2010 SP1 box. Const strUrl = “https://mail.mycompanyetc.com/ews/exchange.asmx” ‘ TODO: Change Const strUser = “myuserid” ‘ TODO: Change Const strPass = “mypassword” Const strDom = “myusersdomain”  ‘ TODO: Change Const strEmailAddress = “myemailaddress@myemaildomain.com”  ‘ TODO: Change  …

0

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 admin path.  This path  provides special admin privileges.  An Exchange Admin login must…

2

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.’——————————————————————————-Function WriteFileText(sFilePath, sText)    Dim objFSO ‘As FileSystemObject    Dim objTextFile ‘As Object        Const ForReading = 1    Const ForWriting = 2    Const ForAppending = 8       …

7

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.’———————————————————————————–Function ReadFileText (sFile)    Dim objFSO ‘As FileSystemObject    dim oTS    dim sText         Set objFSO = CreateObject(“Scripting.FileSystemObject”)     Set oTS = objFSO.OpenTextFile(sFile)    sText = oTS.ReadAll     oTS.close    set…

4

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…

5

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 ‘…

3

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…

0

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…

0

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…

1

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 enumerate attachents…

1