PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming How to take advantage of user defined properties immediately after Outlook Message Itemtype conversion ?

Reply

How to take advantage of user defined properties immediately after Outlook Message Itemtype conversion ?

 
Thread Tools Rate Thread
Old 27-12-2006, 04:28 PM   #1
codemonkey_147
Guest
 
Posts: n/a
Default How to take advantage of user defined properties immediately after Outlook Message Itemtype conversion ?


WinXP Pro , Outlook 2k3, VB , MS VS 6

I inherited an Outlook Project based on the COM Add-In template on
http://www.microeye.com/resources/index.html
The basic function of the Add-In is to provide outlook with
functionality to work on my currrent company's custom forms/outlook
items. In order to provide a reference and way by which the items can
be ordered / grouped / linked with each other (by Project related
information such as customer, project name etc.) user defined
properties were introduced that are being maintained.

My problem lies in the use of old, pre-Add-In MessageTypes immediately
after conversion.
The Add-In provides the user with a way to select multiple items and
set the user defined properties for all of them at the same time by way
of a Form. The code in the dll mainly uses 2 separate functions. One to
convert the old Message Type to the Homemeade Type

oSel.Item(m).MessageClass = "NewAndImproved_MessageClass"

and one to set the user defined properties to the gathered values

Item.UserProperties("ShinyNewProperty") = "User Input String"

Once the message class string has been set to the new class type, the
Object is technically of the new type, but does not have access to the
user defined properties yet. I need access to the new properties asap
since the results are dependent of the type as well as whether it is a
newly created object (of the new type) or an object that has been
converted from an older model item type. Is there a way to do a refresh
or behind the scenes close&reopen ? Am i looking in the wrong place ?

-George

  Reply With Quote
Old 27-12-2006, 05:02 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: How to take advantage of user defined properties immediately after Outlook Message Itemtype conversion ?

> Once the message class string has been set to the new class type, the
> Object is technically of the new type, but does not have access to the
> user defined properties yet.


I'm not quite sure what you're getting at here. On the custom form (new and improved) in design mode, are the properties listed on the All Fields page under User-defined Fields in This Item? IF so, then this technique should work:

Set itm = > oSel.Item(m)
itm.MessageClass = "NewAndImproved_MessageClass"
itm.UserProperties("ShinyNewProperty") = "User Input String"
--
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

"codemonkey_147" <ronin_dishdog@hotmail.com> wrote in message news:1167236885.006944.308000@79g2000cws.googlegroups.com...
> WinXP Pro , Outlook 2k3, VB , MS VS 6
>
> I inherited an Outlook Project based on the COM Add-In template on
> http://www.microeye.com/resources/index.html
> The basic function of the Add-In is to provide outlook with
> functionality to work on my currrent company's custom forms/outlook
> items. In order to provide a reference and way by which the items can
> be ordered / grouped / linked with each other (by Project related
> information such as customer, project name etc.) user defined
> properties were introduced that are being maintained.
>
> My problem lies in the use of old, pre-Add-In MessageTypes immediately
> after conversion.
> The Add-In provides the user with a way to select multiple items and
> set the user defined properties for all of them at the same time by way
> of a Form. The code in the dll mainly uses 2 separate functions. One to
> convert the old Message Type to the Homemeade Type
>
> oSel.Item(m).MessageClass = "NewAndImproved_MessageClass"
>
> and one to set the user defined properties to the gathered values
>
> Item.UserProperties("ShinyNewProperty") = "User Input String"
>
> Once the message class string has been set to the new class type, the
> Object is technically of the new type, but does not have access to the
> user defined properties yet. I need access to the new properties asap
> since the results are dependent of the type as well as whether it is a
> newly created object (of the new type) or an object that has been
> converted from an older model item type. Is there a way to do a refresh
> or behind the scenes close&reopen ? Am i looking in the wrong place ?
>
> -George
>

  Reply With Quote
Old 08-02-2007, 03:59 PM   #3
codemonkey_147
Guest
 
Posts: n/a
Default Re: How to take advantage of user defined properties immediately after Outlook Message Itemtype conversion ?

the issue was finally resolved by
- letting go of the selection objects i.e setting the selection and
all related variables to null
- reacquiring the selection by going through the same motions it took
to get it in the first place
- once the selection is reacquired the individual outlook objects can
use their newly acquired abilities




  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off