Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. get opened folder in Outlook

get opened folder in Outlook

Scheduled Pinned Locked Moved C#
regexquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stephan Wright
    wrote on last edited by
    #1

    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.

    M 1 Reply Last reply
    0
    • S Stephan Wright

      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.

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      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 [^]

      S 1 Reply Last reply
      0
      • M Michael P Butler

        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 [^]

        S Offline
        S Offline
        Stephan Wright
        wrote on last edited by
        #3

        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.

        M 1 Reply Last reply
        0
        • S Stephan Wright

          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.

          M Offline
          M Offline
          Michael P Butler
          wrote on last edited by
          #4

          What method are you using to access the MAPI data? I'm only familiar with using Extended MAPI via C++. PR_CONTAINER_CLASS is a property of the MapiFolder data. It isn't a class, its a defintion for the mapi property id. Michael CP Blog [^]

          S 1 Reply Last reply
          0
          • M Michael P Butler

            What method are you using to access the MAPI data? I'm only familiar with using Extended MAPI via C++. PR_CONTAINER_CLASS is a property of the MapiFolder data. It isn't a class, its a defintion for the mapi property id. Michael CP Blog [^]

            S Offline
            S Offline
            Stephan Wright
            wrote on last edited by
            #5

            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.

            M 1 Reply Last reply
            0
            • S Stephan Wright

              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.

              M Offline
              M Offline
              Michael P Butler
              wrote on last edited by
              #6

              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 [^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups