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
  1. Home
  2. General Programming
  3. C#
  4. outlook folder

outlook folder

Scheduled Pinned Locked Moved C#
questionhelptutorial
1 Posts 1 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.
  • M Offline
    M Offline
    michaelgr1
    wrote on last edited by
    #1

    Hello, I need to find a specific mail message in outlook according it's subject. I want the program to search the mail in all the folders (including in personal folders and all sub-folders) . How can i do it? I wrote this thing: Outlook.Application oApp = new Outlook.Application(); Outlook.NameSpace oNS = oApp.GetNamespace("mapi"); oNS.Logon(Missing.Value, Missing.Value, false, true); Outlook.MAPIFolder oIFolder = oNS.Folders.GetFirst(); Console.WriteLine(oIFolder.Name); int nFolderCount = oNS.Folders.Count; for (int p=1; p<=FolderCount; p++) { if(oIFolder[p].Name=="name") return true; } } The thing is that it checks only the folder name and also it is not working recursively and i don't know how to do it. Any help?

    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