Re: Checking type of a MAPIFolder



Answering to myself...

I've just added the item manually to the items collecion like this:
contact = (MSOutlook.ContactItem)defaultContactFolder.Items.Add(MSOutlook.OlItemType.olContactItem);

Anyway, I'm still interested in knowing if I can change the default contacts folder, for example, to a new folder or a folder in a different store.

Cheers!
Pablo

"Pablo Alvarez Doval" <pablod@xxxxxxxxxxxxxxxxx> wrote in message news:3F091C38-20CE-40C1-90D3-9234AB432F07@xxxxxxxxxxxxxxxx
Thanks, in the end it ws a syntax problem.. I'm having some quite silly days lately :P thanks!

By the way.. I've created a new .pst with a contacts folder there, but when I create a new contact like this...

MSOutlook.ContactItem contact = null;
contact = (MSOutlook.ContactItem)Globals.GRAAddIn.Application.CreateItem(MSOutlook.OlItemType.olContactItem);

... I get the contact added to the contacts folder on the original .pst... is the a way to change this, or to change the default contacts folder?

Thanks a lot!
Pablo

"Ken Slovak - [MVP - Outlook]" <kenslovak@xxxxxxxx> wrote in message news:%23H6bDaIbHHA.5044@xxxxxxxxxxxxxxxxxxxxxxx
MAPIFolder.DefaultItemType. It returns a 32-bit int that's a member of the OlItemType enum, for contacts you're looking for olContactItem which has a value of 2.

--
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


"Pablo Alvarez Doval" <pablod@xxxxxxxxxxxxxxxxx> wrote in message news:B4F98310-0930-41C8-9BE4-DD3F44432072@xxxxxxxxxxxxxxxx
Hi all,

I'm trying to iterate thru all the MAPIFolders in my personal store and get the contacts one. How could I get the 'type' of a folder (say if it is a contacts folder, or an inbox, etc...)? Thanks a lot!

Best Regards!
Pablo



.



Relevant Pages

  • Re: Encryption
    ... xcopy could not be performed ... personal store, did you allow it to be used without prompting? ... I encrypted a folder and copied it to another computer. ...
    (microsoft.public.win2000.security)
  • Re: Encryption
    ... When the EFS private key was imported into the account's ... personal store, did you allow it to be used without prompting? ... I encrypted a folder and copied it to another computer. ... On that computer, I imported the cert/key ...
    (microsoft.public.win2000.security)
  • Re: Checking type of a MAPIFolder
    ... I believe this can be done by setting the current folder as you custom contacts folder and then adding an item to it directly or from a contact form template. ... I've created a new .pst with a contacts folder there, but when I create a new contact like this... ... the OlItemType enum, for contacts you're looking for olContactItem which has a value of 2. ... I'm trying to iterate thru all the MAPIFolders in my personal store and get the contacts one. ...
    (microsoft.public.vsnet.vstools.office)
  • Re: Checking type of a MAPIFolder
    ... in the end it ws a syntax problem.. ... I've created a new .pst with a contacts folder there, but when I create a new contact like this... ... I'm trying to iterate thru all the MAPIFolders in my personal store and get the contacts one. ...
    (microsoft.public.vsnet.vstools.office)
  • Re: Speed of reading email messages
    ... There's no way of knowing what's wrong without seeing your code. ... I would suggest that maybe you are trying to do too much at one time, depending on how many items the user has in that folder. ... You might try a filter or restriction on the items in that folder so you have to process fewer, or whatever you're doing on startup. ... I got a complaint from a user who has many messages that it is too slow to load. ...
    (microsoft.public.office.developer.outlook.vba)