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. COM
  4. Exporting Outlook Mailboxes programmatically

Exporting Outlook Mailboxes programmatically

Scheduled Pinned Locked Moved COM
tutorialquestion
2 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.
  • K Offline
    K Offline
    Kri5
    wrote on last edited by
    #1

    Does anyone know if there is a way how to export emails from the Inbox/Outbox into .msg files programmatically? I tried using the Outlook Object Model, but it asks the user for permission to access the mailboxes and ideally I would like to avoid that (no, i'm *not* writing a virus... - i just would like to do away with user interaction while the program is running ). I also tried using MAPI, and i managed to read emails individually into the IMessage interface, but I can't see how I can stream its properties to a file without iterating on the properties one by one (and potentially risking modifying one property indadvertedly and ruining the entire message). My recent attempt has been with CDO but again, the MessagePtr interface in cdo.dll doesn't seem to support any streaming. Anyone has a better idea?

    P 1 Reply Last reply
    0
    • K Kri5

      Does anyone know if there is a way how to export emails from the Inbox/Outbox into .msg files programmatically? I tried using the Outlook Object Model, but it asks the user for permission to access the mailboxes and ideally I would like to avoid that (no, i'm *not* writing a virus... - i just would like to do away with user interaction while the program is running ). I also tried using MAPI, and i managed to read emails individually into the IMessage interface, but I can't see how I can stream its properties to a file without iterating on the properties one by one (and potentially risking modifying one property indadvertedly and ruining the entire message). My recent attempt has been with CDO but again, the MessagePtr interface in cdo.dll doesn't seem to support any streaming. Anyone has a better idea?

      P Offline
      P Offline
      perlmunger
      wrote on last edited by
      #2

      Microsoft considers this a feature and provides no workaround: http://support.microsoft.com/default.aspx?scid=kb;en-us;821679&Product=ol2002M http://support.microsoft.com/kb/263074 Anything that uses outlook automation to retrieve email messages will have this restriction. -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

      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