PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Add a field to a folder

Reply

Add a field to a folder

 
Thread Tools Rate Thread
Old 05-08-2004, 01:57 PM   #1
Justin
Guest
 
Posts: n/a
Default Add a field to a folder


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!
  Reply With Quote
Old 05-08-2004, 02:39 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Add a field to a folder

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.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Justin" <anonymous@discussions.microsoft.com> wrote in message
news:07a501c47aeb$d35c20b0$a301280a@phx.gbl...
> 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!



  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