AddToFolderFields Optional Boolean. True if the
property will be added to the folder fields, False if not.
The default value is True.
The MAPI Folder, however, has no property/method to access the "property"
"field" that is added to the "folder". So once it gets in there, how do I
get rid of it?
----
My specific problem is that I created a UserProperty on a message, named
"MyDate", and added it with:
MyItem.UserProperties.Add "MyDate", olDateTime, True
MyItem.UserProperties("MyDate") = Now()
Well, this added a folder field (note the "True" parameter).
Then I found out that olDateTime rounds off to the nearest minute. So to
keep the seconds, I had to switch types. A few sessions later, I wrote
another message, and added my redefined property to it::
MyItem.UserProperties.Add "MyDate", olText, True
MyItem.UserProperties("MyDate") = _
Format(Now(),"mmm dd yyyy Hh:Nn:Ss")
Except, the Add fails, NOT because the message already has a UserProperty of
the same name, but different type, BUT INSTEAD because that mysterious
"Folder Field" has it in there. I get a message along the lines that "A
custom field of the same name, but different type, already exists."
It turns out that I don't need the "True"--in fact, (1) I can't get them to
show up in Outlook's U/I, anyway, and (2) I don't need/want the user to be
able to see this in the U/I, anyway.
But I can't help but think there are a bunch of "Folder Fields" out there
that I don't need or want to have defined. So how do I get to them to kill
them?
Thanks,
- Dan
"Dan Haygood" <pos...@the.newsgroup> wrote in message news:ek09m2d1BHA.2080@tkmsftngp04...
I imagine that I have failed to do other stuff, like define all the hooks
that the Format Column dialog wants to be able to set.
Since Outlook knows about them (enough to remember their old data type is
not the same, but not enough to actually show them in the Field Chooser),
I'm hoping that they are exposed for programmatic manipulation somehow.
Thanks again,
Dan
"Sue Mosher [MVP]" <sue...@slipstick.com> wrote in message
news:OuWW$5d1BHA.1160@tkmsftngp04...
FYI, custom fields are hidden messages in the folder and are not exposed for any kind of supported programmatic manipulation.
--
Sue Mosher, Outlook MVP
Outlook and Exchange Solutions
at http://www.slipstick.com
"Dan Haygood" <pos...@the.newsgroup> wrote in message news:uf34Qbe1BHA.1676@tkmsftngp05...
> Thanks, Sue. The problem is that (buried deep in my OP), I can't get them
> to
> show up in Outlook's U/I. When I go to the User-defined Fields in the Field
> Chooser, the UserProperties I added with AddToFolderFields := true DON'T
> show up there.
>
> Since Outlook knows about them (enough to remember their old data type is
> not the same, but not enough to actually show them in the Field Chooser),
> I'm hoping that they are exposed for programmatic manipulation somehow.
>
> Thanks again,
> Dan
>
> "Sue Mosher [MVP]" <sue...@slipstick.com> wrote in message
> news:OuWW$5d1BHA.1160@tkmsftngp04...
> 1. Right-click on the column headings of a table view.
> 2. Choose Field Chooser.
> 3. In the Field Chooser, switch to User-defined Fields in Folder.
> 4. Select the field, and click the Delete button.
> --
>
I couldn't find any documentation for what the heck a "folder field" is, or
how they are stored. So it's quite useful information, that they are hidden
messages. I was able to find them in Field Chooser, too. (So, how do you
hide an item?)
[I think it would be more useful for the user-defined columns to follow the
messages around, since from what I can tell, most users' e-mail doesn't stay
in its default creation folder (though other items do tend to).]
Since I couldn't find this in Help, or in Randy Byrne's "BAWMO2000TR", where
did you find this info?
- Dan
P.S. I would have expected the Help on the routine that adds these
automatically, UserProperties.Add(), or the object itself, UserProperties,
would have had more than an unlinked mention of them. And I would have
expected a search on any of the mentions I've found of this in Help so
far--"folder field", "custom field", or "user-defined field"--would have
turned up something. But, alas, no.
It's even more irritating that "hidden message" and "hidden item" turn up
nothing, once you know what they are. Since there's no ".Hidden" or
".Visible" property on a MailItem, I assume that there is an ItemProperty
for the fact. But, there appears to be no list of the built-in
ItemProperties either! Fortunately, I can iterate through them and check
their IsUserProperty property. I hate writing code to do empirical
documentation.
"Sue Mosher [MVP]" <sue...@slipstick.com> wrote in message
news:eGadvje1BHA.2620@tkmsftngp03...
"Dan Haygood" <pos...@the.newsgroup> wrote in message news:#vNt#9n1BHA.2716@tkmsftngp04...
>
> I couldn't find any documentation for what the heck a "folder field" is, or
> how they are stored. So it's quite useful information, that they are hidden
> messages. I was able to find them in Field Chooser, too. (So, how do you
> hide an item?)
CDO has a HiddenMessages collection.
> [I think it would be more useful for the user-defined columns to follow the
> messages around, since from what I can tell, most users' e-mail doesn't stay
> in its default creation folder (though other items do tend to).]
I think you'd get into a performance issue. To do that, Outlook would have to poll all messages in each folder whenever you called up the User Defined Fields list.
> Since I couldn't find this in Help, or in Randy Byrne's "BAWMO2000TR", where
> did you find this info?
Outlook Spy (http://www.dimaster.com/) or Mdbvu32.exe are wonderful tools for examining Outlook internals.
> P.S. I would have expected the Help on the routine that adds these
> automatically, UserProperties.Add(), or the object itself, UserProperties,
> would have had more than an unlinked mention of them. And I would have
> expected a search on any of the mentions I've found of this in Help so
> far--"folder field", "custom field", or "user-defined field"--would have
> turned up something. But, alas, no.
Outlook Help doesn't even do an adequate job of explaining objects, properties and methods, much less architecture or best practices.
> It's even more irritating that "hidden message" and "hidden item" turn up
> nothing, once you know what they are.
That's because there is no such concept in the Outlook model itself. You have to move into CDO or Extended MAPI.
> But, there appears to be no list of the built-in
> ItemProperties either!
Did you look in the object browser -- it shows the full list.