Microsoft KB Archive/307638

= How To Change the Icon Displayed for an Item in OWA =

Article ID: 307638

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft Exchange Server 2003 Standard Edition
 * Microsoft Exchange 2000 Enterprise Server

-



This article was previously published under Q307638



SUMMARY
This article describes how to use the ActiveX Data Objects (ADO) library to change the icon that is displayed for an item in an Exchange store.



MORE INFORMATION
To change the icon, follow these steps:  In Microsoft Visual Basic, create a new Standard EXE project. Form1 is created by default. On the Project menu, click References. From the list of available references, select Microsoft ActiveX Data Objects 2.5 Library.  Add a command button to the default form, and paste the following code in the Click event of the command button: Private Sub Command1_Click

Dim InfoNT Dim Conn Dim Rec Dim Rs Dim strQ Dim strURL Set Conn = CreateObject(&quot;ADODB.Connection&quot;) Conn.Provider = &quot;ExOLEDB.DataSource&quot;

Set Rs = CreateObject(&quot;ADODB.Recordset&quot;) Set Rec = CreateObject(&quot;ADODB.Record&quot;) Set InfoNT = CreateObject(&quot;WinNTSystemInfo&quot;)

'To do: Change &quot;myTLH/Sample&quot; to a valid virtual root and folder. strURL = &quot;http://&quot; & InfoNT.ComputerName & &quot;/myTLH/Sample/&quot; Conn.Open strURL

'To do: Change the file name to a valid file in the folder noted in strURL. Rec.Open strURL & &quot;test3.txt&quot;, Conn, adModeReadWrite, _ adCreateNonCollection Or adCreateOverwrite

'To do: The .gif file noted below has to be in the /exchweb/img folder. 'You can use any .gif file you want. Rec.Fields(&quot;http://schemas.microsoft.com/exchange/smallicon&quot;).Value = &quot;/exchweb/img/music.gif&quot; Rec.Fields.Update Rec.Close

Conn.Close Set InfoNT = Nothing Set Rec = Nothing Set Rs = Nothing

MsgBox &quot;Finished TestProps&quot; End Sub  In the code, search for comments that are marked &quot;To do&quot; and make any necessary changes. Run the project and click the command button. Using Outlook Web Access (OWA), browse to the folder. Note that the new icon is displayed for the file.</ol>

Note In Microsoft Exchange Server 2003, the smallicon property on an item can no longer be modified because Microsoft Outlook Web Access (OWA) 2003 uses this property to indicate if the item has been replied to or forwarded.

Keywords: kbhowto kbmsg KB307638

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.