View Single Post
  #3  
Old November 7th 06, 05:25 PM posted to microsoft.public.outlook.program_vba
Dirk
external usenet poster
 
Posts: 7
Default Set a Non-Standard Form as the Default Form in a Folder with V

Hi Ken,
thanks for your answer. I never used these lower level APIs before, so I
have to find out how to use them in VBA. Would be nice, if anyone has helpful
hints.


"Ken Slovak - [MVP - Outlook]" wrote:

MAPIFolder is the correct object, but the property you need to set isn't
exposed in the Outlook object model. You need to set PR_DEF_POST_MSGCLASS
(0x36E5001E), PR_DEF_POST_DISPLAYNAME (0x36E6001E) PT_STRING8 properties

PR_DEF_POST_MSGCLASS gets set to the MessageClass you want as the default
and PR_DEF_POST_DISPLAYNAME gets set to the display name of that form.

You will need to use a lower level API such as CDO 1.21 or Extended MAPI
(C++ or Delphi only) or Redemption (www.dimastr.com/redemption) to do what
you want.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Dirk" wrote in message
...
Hi. We have to handle a huge amount of public contactfolders. Now we
created
a new contactform and want to change the existing contactitems to this
form.
So I wrote a VBA-Script, which changes the messageclass of all items in a
folder and all subfolders. This works fine, but with the same script I
want
to set the new form as the default form in all the subfolders. This
doesn't
work, because I can't find the right property of the public folder. I'm
using
the MAPIFolder object. Is this the right one?



Ads