![]() |
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
|
|||
|
|||
![]()
Is there a way to set the Follow Up flag on contacts through vba? The
FlagRequest property is not valid on a ContactItem, although it is on a MailItem; I could not find any 'flag' properties on Contact items, but assume they must be there somewhere since flags can be set via the standard interface. For fun, I tried to use the code below which is successful in setting flags for mail items in a selected folder, but the same code used with 'ContactItem' rather than 'MailItem' generates an error. Dim myFolder as Outlook.MAPIFolder Dim objItem as MailItem For Each objItem In myFolder.Items objItem.FlagRequest = "Follow Up" objItem.Save Next What am I missing? Any help appreciated. |
#2
|
|||
|
|||
![]()
Programming questions like this are best posted in a programming group such
as microsoft.public.outlook.program_vba. What you're missing is first you're trying to access Contact items as Mail items, which won't work at all. Second, you're trying to use a property on a Contact item that doesn't exist on a Contact item. You're correct that you can set flag (and reminder properties) on contact items, but you can't use the Outlook object model to do it (except for Outlook 2007, where those properties are exposed). You would have to use a lower level API such as CDO 1.21, Extended MAPI (C++ or Delphi only) or Redemption (www.dimastr.com/redemption) to access those properties and set them. If you were to use Redemption you could set the FlagRequest property using the DASL syntax for that property of "urn:schemas:httpmail:messageflag" and a string value for the flag text you want. -- 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 "kara" wrote in message ... Is there a way to set the Follow Up flag on contacts through vba? The FlagRequest property is not valid on a ContactItem, although it is on a MailItem; I could not find any 'flag' properties on Contact items, but assume they must be there somewhere since flags can be set via the standard interface. For fun, I tried to use the code below which is successful in setting flags for mail items in a selected folder, but the same code used with 'ContactItem' rather than 'MailItem' generates an error. Dim myFolder as Outlook.MAPIFolder Dim objItem as MailItem For Each objItem In myFolder.Items objItem.FlagRequest = "Follow Up" objItem.Save Next What am I missing? Any help appreciated. |
#3
|
|||
|
|||
![]()
Sorry for the ambiguity...the actual code I attempted to use for accessing
CONTACT items is shown below and works for various properties, just not flags and reminders. Thanks for your response; I will look into the possibility of using CDO and post any follow-up questions to an appropriate programming newsgroup. Dim myFolder as Outlook.MAPIFolder Dim objItem as ContactItem For Each objItem In myFolder.Items objItem.FlagRequest = "Follow Up" objItem.Save Next "Ken Slovak - [MVP - Outlook]" wrote: Programming questions like this are best posted in a programming group such as microsoft.public.outlook.program_vba. What you're missing is first you're trying to access Contact items as Mail items, which won't work at all. Second, you're trying to use a property on a Contact item that doesn't exist on a Contact item. You're correct that you can set flag (and reminder properties) on contact items, but you can't use the Outlook object model to do it (except for Outlook 2007, where those properties are exposed). You would have to use a lower level API such as CDO 1.21, Extended MAPI (C++ or Delphi only) or Redemption (www.dimastr.com/redemption) to access those properties and set them. If you were to use Redemption you could set the FlagRequest property using the DASL syntax for that property of "urn:schemas:httpmail:messageflag" and a string value for the flag text you want. -- 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 "kara" wrote in message ... Is there a way to set the Follow Up flag on contacts through vba? The FlagRequest property is not valid on a ContactItem, although it is on a MailItem; I could not find any 'flag' properties on Contact items, but assume they must be there somewhere since flags can be set via the standard interface. For fun, I tried to use the code below which is successful in setting flags for mail items in a selected folder, but the same code used with 'ContactItem' rather than 'MailItem' generates an error. Dim myFolder as Outlook.MAPIFolder Dim objItem as MailItem For Each objItem In myFolder.Items objItem.FlagRequest = "Follow Up" objItem.Save Next What am I missing? Any help appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
setting up contact management | Henk Jan | Outlook - Using Contacts | 1 | January 9th 07 10:01 PM |
Setting up Outlook Contact so that they can be used to mail merge | Terry Clark | Outlook - Using Contacts | 2 | December 5th 06 09:00 PM |
How do I set conditional flags based on last contact | TOLAR | Outlook - Using Contacts | 0 | September 30th 06 01:10 PM |
setting up customised contact address lists | alioopoop1 | Outlook - Using Contacts | 2 | June 7th 06 12:46 AM |
Setting Read Receipts on a per-contact basis? | Gordon | Outlook - General Queries | 2 | March 8th 06 03:17 PM |