Add a field to a folder

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

How can I add a field to a folder? I have added a
DatabaseID field to all email items that are imported
into a database. The email item is moved to a different
folder after I use UserProperties.Add so even specifying
true for the AddToFolderFields parameter won't really
help because it only adds the field to the folder where
the email was originally located. I would rather not
have to change my code to add the field after the item is
moved, but if there is no way to add a field to a folder
then I will do that. Just thought I would inquire before
going that route. Thanks!
 
Create a PostItem directly in that folder using the MAPIFolder.Items.Add
method, then use UserProperties.Add on that item. You can discard the
PostItem when you're done.
 
Back
Top