WIN32OLE MS Word Help

Hi all,
I am trying to create word document in ruby using WIN32OLE.
as..

require 'win32ole'
word = WIN32OLE.new("Word.Application")
word.visible = true
word.documents.add
selection = word.selection
word.Selection.TypeText "This is some text."
...
..
.

Can we set header and footer to document? I want to generate a
document such that its header contains an image on right side and a
note on left side. please help me out.
Thanks.

Try the following code:

Playing with this a little more I came up with this: