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
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
Stuart C. 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
On Sep 30, 8:33 pm, David M. [email protected] wrote:
David
http://rubyonwindows.blogspot.com/search/label/word
Posted viahttp://www.ruby-forum.com/.
Try to run strings (see man strings) on the word doc and see if there
are any clues.
David M. wrote:
Stuart C. 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.TrackRevisionsThat’s an abbreviated example. Let me know if this would help and you
need more details.David
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
Stuart C. 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:
http://rubyonwindows.blogspot.com/2010/09/coming-soon-win32ole-for-jruby.html
A commenter on the above article provides the following URLs:
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 M. wrote:
Stuart C. 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:http://rubyonwindows.blogspot.com/2010/09/coming-soon-win32ole-for-jruby.html
A commenter on the above article provides the following URLs:
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
David M. wrote:
Stuart C. 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:http://rubyonwindows.blogspot.com/2010/09/coming-soon-win32ole-for-jruby.html
A commenter on the above article provides the following URLs:
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs