HOWTO CDOEX C#: How to extract VCalendar stream from an appointment.

‘ TODO:‘    Create a C# Winform app‘    Reference to Microsoft CDO for Exchange 2000 Server Library (COM) – this ‘      will add a reference to ADO automaticlly.‘    NOTE: Do not add a reference to ADO or ADO.NET – this will cause interferance ‘      with CDOEX/CDOSYS (which you may not see until processing body parts).‘    NOTE:…

1

HOWTO: CDO 1.21/VBS – Get Free/Busy information

‘———————————————————–‘ getfbCDO121.vbs – Get Free/Busy information using CDO1.21 and vbs‘ Instructions:‘   Save to a file called getfbCDO121.vbs ‘   Do the TODO: sections‘   Run from the command line using:  cscript getfbCDO121.vbs ‘————————————————————    Dim ObjSession      ‘MAPI.Session    Dim ObjMessage      ‘MAPI.Message    Dim ObjAddressEntry ‘MAPI.AddressEntry    Dim sFreeBusy    Dim sFBFrom    Dim sFBTo    Dim sLoginProfileInfo ‘ This is sLoginServer + lf +…

0

HOWTO: CDO 1.21/VB Expand a Distribution List

‘HOWTO: CDO 1.21/VB Expand a Distribution List ‘ 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 As MAPI.Recipients    Dim…

0

HOWTO: VB/CDO 1.21 – Delete inbox message attachments over certain size

  Here is an example:    ‘How to read the Inbox messages and delete attachments over a given size using VB and CDO 1.21     ‘ 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…

4

HOWTO: Use PS_INTERNET_HEADERS with cdo 1.21 for custom properties

How to use PS_INTERNET_HEADERS with CDO 1.21 for custom properties. ‘This example uses PS_INTERNET_HEADERS for setting a custom property const smbx=”mymailbox”  ‘ TODO: Changeconst ssrv=”myserver”      ‘ TODO: Changeconst mycdoInetPset = “8603020000000000C000000000000046”const myXheader = “X-SPAM”  ‘ TODO: Change to your property set oses=createobject(“mapi.session”)oses.logon “”, “”, false, true, 0, true, ssrv & vblf & smbxset omsg=oses.inbox.messages.getfirstsfrom=omsg.fields.item(myXheader,myCdoInetPset).valuewscript.echo sfromomsg.fields.add…

0

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

0

EWS DaysOfWeek cannot be set to enumerated days.

If your trying to set the DaysOfWeek for a WeeklyRecurrencePatternType and find that you cannot set it with enumerated values using code such as the following, you will find that it does not work.     WeeklyRecurrencePatternType weeklyPattern = new WeeklyRecurrencePatternType();    weeklyPattern.Interval = 1;    weeklyPattern.DaysOfWeek = new DayOfWeekType[] {DayOfWeekType.Monday, DayOfWeekType.Wednesday}; OK, DaysOfWeek is a string and…

1

EWS – Csharp – List unread inbox messages using a restriction

// C# sample using Exchange Web Service Proxy classes to list unread messages in an inbox using a restriction.    private void FindInFolder()        {             // TODO: Put this code into a winform and call from a button:            // TODO: create 3 text boxes called txtRequest, txtResponse, txtItems            // TODO: Set the properties for the three…

10

HOWTO: csharp – powershell – call get-clusteredmailboxserverstatus with managed code.

// HOWTO: csharp – powershell – call get-clusteredmailboxserverstatus with managed code.// Sample which calls get-clusteredmailboxserverstatus and returns a list of nodes.//TODO://#1 – Create a C# winform application and add a button. //#2 – Add namespace reference statements (using statements)://      //Need for handing things like SecureString types…//      using System.Security;//      // For calling commandlets://      using System.Management.Automation;//      using…

1

HOWTO: csharp – Exchange powershell – call get-StorageGroupCopyStatus with managed code.

This sample is good for both calling and for using with calling other commandlets and seeing what is returend – ie it breaks-down the return results  in general. See, most examples I’ve found so far show only how to get exact properties and not just dump out specific ones.  You should be aware of what…

1