# Regarding MS Office properties

**URL:** <https://www.ruby-forum.com/t/regarding-ms-office-properties/136547>\
**Category:** Ruby\
**Created:** [May 3, 2008, 1:18pm UTC](https://www.ruby-forum.com/t/regarding-ms-office-properties/136547 "2008-05-03T13:18:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranjal\_jain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ac91a4/32.png) [@pranjal\_jain](https://www.ruby-forum.com/u/pranjal_jain)\
**Post date:** [May 3, 2008, 1:18pm UTC](https://www.ruby-forum.com/t/regarding-ms-office-properties/136547/1 "2008-05-03T13:18:13Z")

</div>

Hi all  
If we want to open the outlook & write in it , we use the command

outlook = WIN32OLE.new(‘Outlook.Application’).

message = outlook.CreateItem(0)

message.Subject = ‘Double-Header Today’  
message.Body = ‘This is the message body.’  
message.To = ‘removed\_email\_address@domain.invalid’  
message.Recipients.Add ‘removed\_email\_address@domain.invalid’  
message.Recipients.Add ‘removed\_email\_address@domain.invalid’  
#The second argument, 1, indicates that this is an attached file, rather  
than a #link to the original file.  
message.Attachments.Add(‘c:\Update Ruby gems.txt’, 1)  
message.Send

But in case if we want to write the message in already opened Outlook  
mail, wht should we do ☹

I am hvng no clue regarding it. please suggest.

thnks in advance
