06 Apr '13, 4pm

←宗教上の理由でVBAは使えないけど、 を見てRubyからOutlook叩いてる物好き

←宗教上の理由でVBAは使えないけど、 を見てRubyからOutlook叩いてる物好き

class Outlook include Singleton def initialize @ol = WIN32OLE::connect("Outlook.Application") end def each_mail_filtered folder,subject events = WIN32OLE_EVENT.new(@ol,"ApplicationEvents_11") search_done = false events.on_event("AdvancedSearchComplete") do |search| results = search.Results count = results.Count puts count return if count == 0 1.upto(count) do |i| yield results.Item(i) end search_done = true end if subject !~ /\%/ then @ol.AdvancedSearch(folder,"urn:schemas:mailheader:subject = '#{subject}'") else @ol.AdvancedSearch(folder,"urn:schemas:mailheader:subject LIKE '#{subject}'") end WIN32OLE_EVENT.message_loop until search_done end end

Full article: http://jp.rubyist.net/magazine/?0007-Win32OLE


@fimbul11 gem i rspec こんなん https://t.co/fpOM1pq6ng

jp.rubyist.net 06 Apr '13, 8am

spec -fs array_spec.rb Array when empty - should be empty - should size 0 Array when initialized with object - should not ...

SmallBiz Refresh: : Economy Positive, But Consu...

networksolutions.com 07 Apr '13, 5pm

Economy Positive, But Consumers’ Outlook Still Negative March 7th, 2013 :: Karen Axelton By Maria Valdez Haubrich America’...