From: Mick Miller Date: 2008-01-30T02:15:02+09:00 Subject: Re: Ruby & Word 2007 help - SOLUTION Mr Masaki, The solution you suggested works! I replaces the line: doc = word.Documents.Open(File.expand_path(file)) with the three lines you suggested. Thank you, Mick Masaki Suketa wrote: > Hello, > > In message "Re: Ruby & Word 2007 help" > on 07/08/24, "Craig Demyanovich" writes: > >> I'm not sure what to do next, since File.expand_path() returns a path with >> forward slashes on Windows. Nevertheless, I hope that this information >> allows the next step toward a solution to be taken. > > How about GetAbsolutePathName of Scripting.FileSystemObject? > > fso = WIN32OLE.new("Scripting.FileSystemObject") > path = fso.GetAbsolutePathName("test.doc") > doc = word.Documents.Open(path) > > Regards, > Masaki Suketa -- Posted via http://www.ruby-forum.com/.