Drag’n’drop one or more mails from Outlook to C# WPF application

I found a great article that should do exactly what you need to. UPDATE I was able to get the code in that article working in WPF with a little tweaking, below are the changes you need to make. Change all references from System.Windows.Forms.IDataObject to System.Windows.IDataObject In the OutlookDataObject constructor, change FieldInfo innerDataField = this.underlyingDataObject.GetType().GetField(“innerData”, … Read more

.NET: Get all Outlook calendar items

I’ve studied the docs and this is my result: I’ve put a time limit of one month hard-coded, but this is just an example. public void GetAllCalendarItems() { Microsoft.Office.Interop.Outlook.Application oApp = null; Microsoft.Office.Interop.Outlook.NameSpace mapiNamespace = null; Microsoft.Office.Interop.Outlook.MAPIFolder CalendarFolder = null; Microsoft.Office.Interop.Outlook.Items outlookCalendarItems = null; oApp = new Microsoft.Office.Interop.Outlook.Application(); mapiNamespace = oApp.GetNamespace(“MAPI”); ; CalendarFolder = mapiNamespace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar); … Read more

Formatting html email for Outlook

To be able to give you specific help, you’s have to explain what particular parts specifically “get messed up”, or perhaps offer a screenshot. It also helps to know what version of Outlook you encounter the problem in. Either way, CampaignMonitor.com’s CSS guide has often helped me out debugging email client inconsistencies. From that guide … Read more

Line-height not working in Outlook 2010 for HTML Email

I use a combination of inline CSS to control line-height: <p style=”padding:0px;margin:0px;margin-auto:0px;mso-line-height-rule: exactly;line-height:110%;font-size:11pt;”>paragraph text</p> The key element is the Microsoft proprietary CSS attribute, mso-line-height-rule: exactly;. The padding just prevents the paragraph tags from creating unnecessary space.

Does VBA contain a comment block syntax? [duplicate]

Although there isn’t a syntax, you can still get close by using the built-in block comment buttons: If you’re not viewing the Edit toolbar already, right-click on the toolbar and enable the Edit toolbar: Then, select a block of code and hit the “Comment Block” button; or if it’s already commented out, use the “Uncomment … Read more