From: gabriele renzi Date: 2004-03-12T20:04:37+09:00 Subject: Re: Save OpenOffice files as MS Word document il 11 Mar 2004 17:07:04 -0800, qewrty@netscape.net (Memory Seeker) ha scritto:: >Hi, > >Could anyone show me how to use Ruby to convert a .sxw file to .doc properly? > >I've tried the following but it doesn't work as MS office can't open the .doc: > > src_url = "file:/#{MyDoc.doc}".gsub( /\\/, '/' ) > dest_url = "file:/#{MyDoc.sxw}".gsub( /\\/, '/' ) > serviceManager = WIN32OLE.new("com.sun.star.ServiceManager") > desktop = serviceManager.createInstance("com.sun.star.frame.Desktop") > document = desktop.loadComponentFromURL(src_url, "_default", 0, []) > document.storeAsURL( dest_url, [] ) > > >Thanks >PS: Converting from .doc to .sxw worked just fine using this code, so I'm confused. I wonder: maybe is OOo itself that does the conversion badly? does it work if the process is done with the actual program instead of ole ?