Microsoft Word metadata extraction query

Hey all,

Is anyone aware of a library to identify the use of track changes in
Microsoft Word documents? I basically and looking for something to scan
the file and say 'Track Changes - Y/N'

Many thanks in advance

···

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

Stuart Clarke wrote:

Hey all,

Is anyone aware of a library to identify the use of track changes in
Microsoft Word documents? I basically and looking for something to scan
the file and say 'Track Changes - Y/N'

Many thanks in advance

Not sure if this can be done by "scanning the file".

It can be done via Win32OLE, by checking the Document object's
TrackRevisions property.

require 'win32ole'
word = WIN32OLE.new('Word.Application')
doc = word.Documents.Open('c:\stuff.doc')
is_tracking = doc.TrackRevisions

That's an abbreviated example. Let me know if this would help and you
need more details.

David

···

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

Try to run strings (see man strings) on the word doc and see if there
are any clues.

···

On Sep 30, 8:33 pm, David Mullet <david.mul...@gmail.com> wrote:

Stuart Clarke wrote:
> Hey all,

> Is anyone aware of a library to identify the use of track changes in
> Microsoft Word documents? I basically and looking for something to scan
> the file and say 'Track Changes - Y/N'

> Many thanks in advance

Not sure if this can be done by "scanning the file".

It can be done via Win32OLE, by checking the Document object's
TrackRevisions property.

require 'win32ole'
word = WIN32OLE.new('Word.Application')
doc = word.Documents.Open('c:\stuff.doc')
is_tracking = doc.TrackRevisions

That's an abbreviated example. Let me know if this would help and you
need more details.

David

Ruby on Windows: word
--
Posted viahttp://www.ruby-forum.com/.

David Mullet wrote:

Stuart Clarke wrote:

Hey all,

Is anyone aware of a library to identify the use of track changes in
Microsoft Word documents? I basically and looking for something to scan
the file and say 'Track Changes - Y/N'

Many thanks in advance

Not sure if this can be done by "scanning the file".

It can be done via Win32OLE, by checking the Document object's
TrackRevisions property.

require 'win32ole'
word = WIN32OLE.new('Word.Application')
doc = word.Documents.Open('c:\stuff.doc')
is_tracking = doc.TrackRevisions

That's an abbreviated example. Let me know if this would help and you
need more details.

David

Ruby on Windows: word

David,

That is excellent, thanks.

My next issue is getting the gem installed on JRuby. It keeps failing to
find the gem in the repository, I have had a search around to download
the compiled gem but I have not been able to find it.

Any ideas?

Many thanks

···

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

Stuart Clarke wrote:

My next issue is getting the gem installed on JRuby. It keeps failing to
find the gem in the repository, I have had a search around to download
the compiled gem but I have not been able to find it.

Any ideas?

Ah, you're working with JRuby. Unlike standard Ruby (on Windows),
JRuby's install doesn't include a win32ole library. But it will soon:

  Ruby on Windows: Coming Soon: win32ole for JRuby

A commenter on the above article provides the following URLs:

  http://github.com/enebo/jacob

  http://github.com/enebo/jrwin32ole

I haven't tried these yet, but they may meet your needs until JRuby 1.6
is released.

David

···

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

David Mullet wrote:

Stuart Clarke wrote:

My next issue is getting the gem installed on JRuby. It keeps failing to
find the gem in the repository, I have had a search around to download
the compiled gem but I have not been able to find it.

Any ideas?

Ah, you're working with JRuby. Unlike standard Ruby (on Windows),
JRuby's install doesn't include a win32ole library. But it will soon:

  Ruby on Windows: Coming Soon: win32ole for JRuby

A commenter on the above article provides the following URLs:

  http://github.com/enebo/jacob

  http://github.com/enebo/jrwin32ole

I haven't tried these yet, but they may meet your needs until JRuby 1.6
is released.

David

David,

Thanks for getting back to me.

I have tried both of these GEM's and both fail to install and I get the
following error:

C:\jruby-1.5.3\bin>jruby -S gem install jrwin32ole
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
ERROR: could not find gem jrwin32ole locally or in a repository

Many thanks

Stuart

···

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

David Mullet wrote:

Stuart Clarke wrote:

My next issue is getting the gem installed on JRuby. It keeps failing to
find the gem in the repository, I have had a search around to download
the compiled gem but I have not been able to find it.

Any ideas?

Ah, you're working with JRuby. Unlike standard Ruby (on Windows),
JRuby's install doesn't include a win32ole library. But it will soon:

  Ruby on Windows: Coming Soon: win32ole for JRuby

A commenter on the above article provides the following URLs:

  http://github.com/enebo/jacob

  http://github.com/enebo/jrwin32ole

I haven't tried these yet, but they may meet your needs until JRuby 1.6
is released.

David

David,

Thanks for getting back to me.

I have tried both of these GEM's and both fail to install and I get the
following error:

C:\jruby-1.5.3\bin>jruby -S gem install jrwin32ole
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
ERROR: could not find gem jrwin32ole locally or in a repository

Many thanks

···

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