Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Win32OLE word objects

Reply
Thread Tools

Win32OLE word objects

 
 
Chris Tranter
Guest
Posts: n/a
 
      04-19-2011
Hi,

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.Val ue = 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

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Mike Stephens
Guest
Posts: n/a
 
      04-19-2011
I would have thought you could use your VBA code more or less verbatim.

See http://rubyonwindows.blogspot.com/search/label/word

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Chris Tranter
Guest
Posts: n/a
 
      04-19-2011
Thanks, sometimes it's the simple answer. The link to this file really
helps....http://msdn.microsoft.com/en-us/libr...ffice.12).aspx

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

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
win32ole word find replace jhn Vln Ruby 1 10-21-2009 01:52 AM
Word + win32ole - how to find formatting of a word? Mohit Sindhwani Ruby 5 10-27-2008 03:20 AM
WIN32OLE - failed to create WIN32OLE zxem Ruby 1 12-19-2007 07:01 PM
WIN32OLE#[] and WIN32OLE#[]= method in Ruby 1.9 (or later) Masaki Suketa Ruby 4 03-27-2006 11:17 AM
Looking for Win32OLE sample code (Tables in Word) Jim Freeze Ruby 0 01-27-2004 05:24 PM



Advertisments