![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Store properties from PropertyAccessor too. You have to exit and restart
Outlook before changes you make are readable in the OOM, although OutlookSpy sees them immediately. Something to do with caching properties I imagine. -- 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 "Sue Mosher [MVP-Outlook]" wrote in message ... You'll have to settle for doing it manually at present. There apparently is a bug in Beta 2 related to using PropertyAccessor to set folder properties. Otherwise, you'd be able to use something like (VBA prototype): Sub SetDefaultFormFolder(fld As Outlook.Folder, _ formClass As String, formName As String) Dim pa As Outlook.PropertyAccessor Dim propNames() Dim propValues() Dim arrErrors() strPR_DEF_POST_MSGCLASS = _ "http://schemas.microsoft.com/mapi/proptag/0x36E5001E" strPR_DEF_POST_DISPLAYNAME = _ "http://schemas.microsoft.com/mapi/proptag/0x36E6001E" 'On Error Resume Next If Not fld Is Nothing Then propNames() = Array(strPR_DEF_POST_MSGCLASS, _ strPR_DEF_POST_DISPLAYNAME) propValues() = Array(formClass, formName) Set pa = fld.PropertyAccessor arrErrors = pa.SetProperties(propNames, propValues) If Not (IsEmpty(arrErrors)) Then 'Examine the arrErrors array to determine if any 'elements contain errors For i = LBound(arrErrors) To UBound(arrErrors) 'Examine the type of the element If IsError(arrErrors(i)) Then Debug.Print (CVErr(arrErrors(i))) End If Next End If End If Set pa = Nothing End Sub Alternatively, if your add-in creates the folder, then you could deploy it by including a .pst file as a project resource, with the folder in that file, already prepopulated with the desired properties. Your code would simply copy the folder to the user's existing folder hierarchy. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
2002 outlook, how do i make my custom contact form my default | Linda | Outlook - Using Contacts | 1 | June 23rd 06 01:56 AM |
Is it possible to open the default Contact form with the Activities tab activated from a custom form? VSTO 2005, Outlook 2003 | David Webb | Outlook and VBA | 1 | June 20th 06 10:59 PM |
Unable to Set Default Data File for Use with Outlook 2007 | Marc Joffe | Outlook - Installation | 2 | June 19th 06 03:08 AM |
Code to set Flag Status to complete on custom form | ICT User | Outlook - Using Forms | 3 | March 28th 06 12:59 AM |
Setting Custom Form as Default | Amber | Outlook - Using Forms | 3 | January 27th 06 11:29 PM |