Win32OLE word objects


I’m fairly new to Ruby (and coding in general)and I’m having problems
trying to interact with objects in Word.

The word vba code I’m trying to replicate is as follows, basically I
don’t know how to recognise the dropdown and checkbox fields in Word.

ActiveDocument.FormFields(“PaxType2”).DropDown.Value = 3
ActiveDocument.FormFields(“PNRCheckBox”).CheckBox.Value = False
b = ActiveDocument.FormFields(“PNRCheckBox”).CheckBox.Value

Can anyone help, and also point me in the direction of how best to
source this info so as not to bother with these type of requests again.

Many thanks

I would have thought you could use your VBA code more or less verbatim.


Thanks, sometimes it’s the simple answer. The link to this file really

Not sure why it wasn’t working before, maybe I was trying to be too cute