How to Use CTRL + C ie Copy to clipboard text from word file

How to Use CTRL + C ie Copy to clipboard text from word file.

Talib H. wrote:

How to Use CTRL + C ie Copy to clipboard text from word file.

Any one please

2008/12/15 Talib H. [email protected]:

How to Use CTRL + C ie Copy to clipboard text from word file.

require ‘win32ole’
word = WIN32OLE.new(‘word.application’)
file = ‘c:/work/test.doc’
doc = word.documents.open(file,‘ReadOnly’ => true)
word.selection.wholestory # select whole text
word.selection.copy # copy to clipboard
word.activedocument.close(false)
word.quit

Regards,
Park H.

Heesob P. wrote:

2008/12/15 Talib H. [email protected]:

How to Use CTRL + C ie Copy to clipboard text from word file.

require ‘win32ole’
word = WIN32OLE.new(‘word.application’)
file = ‘c:/work/test.doc’
doc = word.documents.open(file,‘ReadOnly’ => true)
word.selection.wholestory # select whole text
word.selection.copy # copy to clipboard
word.activedocument.close(false)
word.quit

Regards,
Park H.

Thanks dear,

Can I use something like the copied content on “word.selection.copy” as
“word.selection.paste”

please advise

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs