Accessing Outlook folders, other than Inbox

Hi Dossy,
This is a good enough starting point. Thanks.



Can someone tell me how to access other Outlook folders
using win32ole?


This is a fairly ugly way to do it, but it works for me:

require 'win32ole'

o ="Outlook.Application")

ns = o.GetNamespace("MAPI")
cf = ns.GetDefaultFolder(9)
e = o.Explorers.Add(cf, 2)

items = cf.Items
(1 .. items.Count).each { |n|
  item = items.Item(n)
  puts "#{item.Start}: #{item.Subject}"

# Shut down Outlook process.

This iterates over all the appointments you have defined
in your Calendar.

This may not be helpful, but it might give you some
ideas …

– Dossy

Dossy Shiobara mail:
Panoptic Computer Network web:
“He realized the fastest way to change is to laugh at your own
folly – then you can let go and quickly move on.” (p. 70)