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.

Philip