get opened folder in Outlook
-
Hy everyone! I know it is possible to access any folder in Outlook via MAPI but I do want to check if the opend folder is lets say the Inbox folder. Or is it possible to check if an item (e.g. a contact item) was selected? Because I do want my button to be only selectable/clickable when one of those match. Meaning when any other folder is open then the button should appear grayed out. Thanks! Stephan.
-
Hy everyone! I know it is possible to access any folder in Outlook via MAPI but I do want to check if the opend folder is lets say the Inbox folder. Or is it possible to check if an item (e.g. a contact item) was selected? Because I do want my button to be only selectable/clickable when one of those match. Meaning when any other folder is open then the button should appear grayed out. Thanks! Stephan.
I'm not sure what method of MAPI you are using but Stephan Wright wrote: I know it is possible to access any folder in Outlook via MAPI but I do want to check if the opend folder is lets say the Inbox folder. This is stored in the PR_CONTAINER_CLASS property. Stephan Wright wrote: Or is it possible to check if an item (e.g. a contact item) was selected? PR_MESSAGE_CLASS property identifies the type. A contact is IPM.Contact or occasionally IPM.Contact.SBE Michael CP Blog [^]
-
I'm not sure what method of MAPI you are using but Stephan Wright wrote: I know it is possible to access any folder in Outlook via MAPI but I do want to check if the opend folder is lets say the Inbox folder. This is stored in the PR_CONTAINER_CLASS property. Stephan Wright wrote: Or is it possible to check if an item (e.g. a contact item) was selected? PR_MESSAGE_CLASS property identifies the type. A contact is IPM.Contact or occasionally IPM.Contact.SBE Michael CP Blog [^]
thanks for the hint but I do still have two questions: 1) Where is this PR_CONTAINER_CLASS located in? Because I can't find it 2) Together with this class: Is it possible to send the data to an application via argument that way or am I just able to check if it is this type. Or is it possible to assign it somewhere? meaning is it something like if(item.type==IPM.contact.SBE) ..... or do I get access (a pointer?) to the object to use it for something else? Thanks! Stephan.
-
thanks for the hint but I do still have two questions: 1) Where is this PR_CONTAINER_CLASS located in? Because I can't find it 2) Together with this class: Is it possible to send the data to an application via argument that way or am I just able to check if it is this type. Or is it possible to assign it somewhere? meaning is it something like if(item.type==IPM.contact.SBE) ..... or do I get access (a pointer?) to the object to use it for something else? Thanks! Stephan.
-
the way I get there is new application of Outlook then namespace of MAPI By the way: My programminglanguage is C# in Visual Studio, but well it should be all the same in Visual Studio! :-) Stephan.
-
the way I get there is new application of Outlook then namespace of MAPI By the way: My programminglanguage is C# in Visual Studio, but well it should be all the same in Visual Studio! :-) Stephan.
Ok. You are using the Outlook object model. Sorry, for leading you down the wrong path. If you have a MapiFolder object then you can use GetDefaultItemType() method to get the type of items in the folder. I can't remember all the values but a google for Outlook GetDefaultItemType should return some more details. Michael CP Blog [^]