lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Thanks for the replies. I tried forward slash and double back slash as well. Finally this worked:

word.Document:Open("D:/1.docx")   -- notice the colon between Document and Open

On Aug 8, 2015 5:14 AM, "Rena" <> wrote:

On Aug 8, 2015 1:42 AM, "Jonathan Goble" <> wrote:
> On Sat, Aug 8, 2015 at 12:50 AM, Milind Gupta <> wrote:
> >> word.Documents.Open("D:/1.docx")
> I'm not familiar with LuaCOM, but Windows paths use backslashes, so
> unless LuaCOM is converting it automatically, you want "D:\\1.docx"
> (doubled because you have to escape a literal backslash to prevent it
> from being treated as special). Could that be causing the problem?

Windows will accept forward slashes as well, unless something funny is going on.