lua-users home
lua-l archive

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


Hi Terry. What version of LuaCOM are you using? Just tested your sample code
using luaCom 1.2 and Office 2003 and it worked fine.

 

> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br 
> [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Terry Bayne
> Sent: Tuesday, January 31, 2006 1:15 PM
> To: Lua list
> Subject: Re: LuaCOM - more questions
> 
> Fabio,
> 
> Thanks for spotting that, but still getting a type mismatch error:
> 
> 	LUA: Calling word.Documents:Add
> 	Error executing lua code: [COM 
> error:(E:\Blackdog\kibble\trunk\luacom\src\library\tLuaCOM.cpp
> ,403):Type mismatch.]
> 
> Here is the lua code I am running:
> 
> 	word = luacom.CreateObject("Word.Application")	
> 	MT = luacom.CreateObject("type.missing")
> 	assert(word)word.visible = true
> 	print("Calling word.Documents:Add")
> 	doc = word.Documents:Add()
> 	print("Back from Documents:Add()")
> 
> Any ideas?
> 
> Also I have tried passing MT to the Add() call like so:
> 
> 	doc = word.Documents:Add(MT,MT,MT,MT)
> 
> Thanks