Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / January 2004

Tip: Looking for answers? Try searching our database.

Changing Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 04 Jan 2004 12:20 GMT
I have imported my contacts from outlook 2002 to 2003. I
have also created a customs form, which I would like to
use with my contacts. The contact have been imported in a
new folder called MANConants, this is not the defaults
contacts folder. The new form is called MAN Members
Contacts. I have tried the following script but it did not
work. But it did not work. What do I need to do

Paul

Sub ChangeMessageClass()
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set ContactsFolder = _
   olNS.GetDefaultFolder(olFolderContacts)
Set ContactItems = ContactsFolder.Items
For Each Itm In ContactItems
  If Itm.MessageClass <> "IPM.Contact.MAN Members Form"
Then
     Itm.MessageClass = "IPM.Contact.MAN Members Form"
     Itm.Save
  End If
Next
End Sub
Sue Mosher [MVP] - 04 Jan 2004 22:02 GMT
To get a non-default folder, you need to walk the folder hierarchy using the
Folders collections or use a function that does that for you. See
http://www.slipstick.com/dev/code/getfolder.htm

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> I have imported my contacts from outlook 2002 to 2003. I
> have also created a customs form, which I would like to
[quoted text clipped - 20 lines]
> Next
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.