Tag Archives: format

Outlook Object Model: How to include usemap attribute programmatically?


In this post, I will show you how to make use of usemap attribute of img HTML element in HTML emails programmatically. For this, I used Outlook 2010 VBA & Outlook Object Model. You can design the application with C# or VB.Net with Outlook Object Model library as per your wish.

We will do this exercise in two steps:

First, we need to set the Bodyformat of the message as olFormatHTML
Second, at the Message body we need to include the usemap attribute with img HTML element.

Here is the code snippet that I tried:

   1: ...

   2: Dim str As String

   3: Dim newMSG As Outlook.MailItem

   4:  

   5: Set newMSG = Application.CreateItem(0)

   6: newMSG.To = Session.CreateRecipient("test@testexchange.com")

   7: newMSG.Subject = "Test message"

   8: newMSG.BodyFormat = olFormatHTML

   9: newMSG.Body = "start Body here.  "

  10: newMSG.Body = newMSG.Body & "  Add more text."

  11:  

  12: str = "<html> <body> <p>Click the logo:</p>"

  13: str = str & " <img src='http://www.microsoft.com/presspass/imagegallery/images/products/office/office2010/MS_Office_w_2010_vertical_web.jpg' width=200 height=200 alt='Sites' usemap='#sitesmap' />"

  14: str = str & " <map name='sitesmap'> <area shape='rect' coords='0,0,82,126' alt='Bing' href='http://www.bing.com'/>"

  15: str = str & " <area shape='circle' coords='0,90,58,3' href='www.microsoft.com' alt='Microsoft'/>"

  16: str = str & "</map> </body> </html>"

  17:  

  18: newMSG.HTMLBody = str

  19: newMSG.Save

  20: 'newMSG.Send

  21: newMSG.Display

  22: ...

Once you’re done, try run the above sample – you’ll see the below results whenever you move to cursor to the above co-ordinates.

clip_image001

clip_image002

Happy programming!!

Cyber Monday e-deal: Save 60% on ALL Microsoft Press e-books


Microsoft Press

Published by the experts at Microsoft Press. Now distributed by O’Reilly Media.

When you buy an e-book through oreilly.com you get lifetime access to the book, and whenever possible we provide it to you in four, DRM-free file formats—PDF, .epub, Kindle-compatible .mobi, and Android .apk—that you can use on the devices of your choice. Our ebook files are fully searchable, and you can cut-and-paste and print them.

You can free to choose #Ebook Deal/Day. Save 60% on ALL Microsoft Press e-books!
Use code: DDF2H  
Visit: http://microsoftpress.oreilly.com

clip_image001

Fix: Using Outlook to send an e-mail message, the recipient of the message see Winmail.dat attachment


One of our customer reported that one of their recipient receives winmail.dat in the messages as the attachment. Based on analysis, we found that if the recipients of your messages receive an attachment called winmail.dat, you sent messages to them that included Microsoft Exchange Rich Text formatting (RTF), such as bold or italic text, but the recipients do not use an e-mail program that can read this format or does not support certain message formats or certain features that are included in the e-mail message.

To overcome this, try the following:

1) Using Outlook UI:

To select a message format do the following:

  1. On the Tools menu, click Options.
  2. On the Mail Format tab, under Message format, in the Compose in this message format list, click HTML or Plain Text.

2) Using Microsoft Fixit.

There is a fix available from Microsoft Fixit site regarding the same. Please refer the KB before you download it.

To fix this problem automatically, first install hotfix 957692 ( http://support.microsoft.com/kb/957692/ ) then click the Fix this problem link. Then click Run in the File Download dialog box, and follow the steps in this wizard.


Fix this problem

Microsoft Fix it 50041

Hope this helps.

Enhance Windows/Exchange Search using Microsoft Filter Pack


How to Enhance Windows Search using Microsoft Filter Pack?

The Windows Search service can be enhanced by installing the Microsoft Filter Pack, which provides additional IFilters to support critical search scenarios across multiple Microsoft Search products. The Filter Pack includes the following IFilters:

  • Metro (.docx, .docm, .pptx, .pptm, .xlsx, .xlsm, .xlsb)
  • Visio (.vdx, .vsd, .vss, .vst, .vdx, .vsx, .vtx)
  • OneNote (.one)
  • Zip (.zip)

When you install the Filter Pack (which you can download for free), the IFilters in the preceding list are installed and registered with the Windows Search service. The Filter Pack is available for x86 and x64 versions of Windows Vista, Windows Server 2008, Windows XP, and Windows Server 2003

Exchange Search & IFilters:

Exchange Search uses IFilters to index text content in different file formats. In order to implement that you need to download the Microsoft Filter Pack. This will install and register IFilters with the Microsoft Windows Indexing Service. These IFilters are used by Microsoft Search products to index the contents of specific document formats.

Office 2007/Exchange Server 2007:

You can download (either x86/x64) Microsoft Filter Pack @ http://www.microsoft.com/downloads/en/details.aspx?FamilyId=60C92A37-719C-4077-B5C6-CAC34F4227CC&displaylang=en. This will install and register IFilters with the Microsoft Windows Indexing Service.

This Filter Pack includes IFilters for the following formats: .docx, .docm, .pptx, .pptm, .xlsx, .xlsm, .xlsb, .zip, .one, .vdx, .vsd, .vss, .vst, .vdx, .vsx, and .vtx. Because Windows Desktop Search (WDS) consumes IFilters from Windows Indexing Service, the IFilters will be automatically registered and available for use by WDS.

To register these IFilters with a specific Search product, please see the associated KB article below:

Office 2010 & Exchange Server 2010:

Microsoft Office 2010 Filter Packs includes filters for Microsoft Office 2010 and Office 2007 file formats. Installation of the Filter Pack is a pre-requisite for Exchange 2010 Mailbox and Hub Transport servers. For details, see Exchange 2010 Prerequisites. The following file name extensions are supported by the filter pack: .docm, .docx, .one, .pptm, .pptx, .vdx, .vsd, .vss, .vst, .vsx, .vtx, .xlsb, .xlsm, .xlsx, .zip. For more information and to download the Filter Pack, see Microsoft Office 2010 Filter Packs.

After you install the Filter Pack, the included IFilters are registered with Windows Search. To allow Exchange 2010 to index Office 2010 file formats, the IFilters must also be registered with Exchange Search.

In Exchange 2010 SP1, Exchange Setup registers the IFilters from Office 2010 Filter Packs with Exchange Search. In the release to manufacturing (RTM) version of Exchange 2010, you must register the IFilters with Exchange 2010 by modifying the registry. You must perform this step after you have installed Exchange 2010 RTM on the server.

Please note

In Exchange 2010 RTM, you can meet the prerequisite by installing 2007 Office System Converter: Microsoft Filter Pack. We recommend that you upgrade to the Office 2010 version of the Filter Pack.

Related article:

How to Register IFilters 2.0 with Exchange 2007 and Exchange 2010
http://technet.microsoft.com/en-us/library/ff354976%28EXCHG.80%29.aspx