Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting this code to work in Outlook VBS?

Status
Not open for further replies.

chrisgreen

Programmer
Jun 28, 2000
61
GB
How do I get this code to work in an outlook form?<br><br><br>Sub ChangeMessageClass()<br>Set olApp = New Outlook.Application<br>Set olNS = olApp.GetNameSpace(&quot;MAPI&quot;)<br>Set ContactsFolder = _<br>    olNS.GetDefaultFolder(olFolderContacts)<br>Set ContactItems = ContactsFolder.Items<br>For Each Itm in ContactItems<br>   If Itm.MessageClass &lt;&gt; &quot;IPM.Contact.MyForm&quot; Then<br>      Itm.MessageClass = &quot;IPM.Contact.MyForm&quot;<br>      Itm.Save<br>   End If<br>Next<br>End Sub<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top