COMplugin0.72_100114.zip
in 
http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/

;don't have SpellingOptions in Excel 2000
AppRef.SpellingOptions.IgnoreCaps=1

com.set_arg_types("s t t ",1)
remember you can use
com.set_arg_types("s t t ") 
and type_spec with autoreset after next invoke

These work for me

;omitted optionals
com.set_arg_types("s t t ")
win.debug(AppRef.CheckSpelling("HAX"), com_status)

;ignored optionals
com.set_arg_types("s t t ")

win.debug(AppRef.CheckSpelling("hex", "", ""), com_status)

;my VBA docs say: CheckSpelling IgnoreUppercase: 
;If this argument is omitted, the 
;current setting will be used.

;added skipped_arg_marker

com.set_arg_types
;not necessary, default marker is "~~"
com.set_skipped_arg_marker("~~") 
win.debug(AppRef.CheckSpelling("HAX", "~~", 1), com_status)

Some very strange behaviour in my version of excel:
using an explicit IgnoreUppercase parameter seems to have effect of
making that the default value in subsequent calls.  So if you step this in VBA 
in an excel module,

x = Application.CheckSpelling(Word:="HAX", IgnoreUppercase:=1)
x = Application.CheckSpelling(Word:="HAX")

you get true twice

and this

x = Application.CheckSpelling(Word:="HAX", IgnoreUppercase:=0)
x = Application.CheckSpelling(Word:="HAX")

gets false twice

Same applies to equivalent COM plugin script.

What I now need to do is 

AppRef.CheckSpelling(333)

and see if it chokes, like your Search function.
Hope it does, then I can trace the bug.

--- In [email protected], "Sheri" <sheri...@...> wrote:

> 
> Use following corrected version.
> 
> exec.onerror("display")
> global com_status, com_type
> local AppRef=com.create_object("Excel.Application")
> com.set_arg_types("s t t ",1)
> ;not getting an error when there are not enough params
> ;if the invoke will be executed without errorring,
> ;possibly it should completely ignore the mismatched typespec
> ;b/c chances are the typespec should be been released
> ;i.e., not intended for the function that got invoked
> win.debug("using mismatched typespec count, same invokes in last set")
> com.set_arg_types
> AppRef.SpellingOptions.IgnoreCaps=1
> com.set_arg_types("s t t ",1)
> win.debug(AppRef.CheckSpelling("HAX"),"(s/b 1 OR not exec due to error)", ;;+
> com_status)
> com.set_arg_types
> AppRef.SpellingOptions.IgnoreCaps=0
> win.debug(AppRef.CheckSpelling("HAX"),"(s/b 0 OR not exec due to error)", ;;+
> com_status)
> ;same test with correct number of params
> com.set_arg_types
> AppRef.SpellingOptions.IgnoreCaps=1
> com.set_arg_types("s t t ",1)
> win.debug("using skipped parameters")
> win.debug(AppRef.CheckSpelling("HAX", "", ""),"(s/b 1)", com_status)
> com.set_arg_types
> AppRef.SpellingOptions.IgnoreCaps=0
> com.set_arg_types("s t t ",1)
> win.debug(AppRef.CheckSpelling("HAX", "", ""), "(s/b 0)", com_status)
> com.set_arg_types ;; release persistent typespec
> ;same test with skipped params omitted from the end
> win.debug("using omitted-from-end w no typespec")
> com.set_arg_types
> AppRef.SpellingOptions.IgnoreCaps=1
> com.set_arg_types("s t t ",1)
> win.debug(AppRef.CheckSpelling("HAX"),"(s/b 1)", com_status)
> com.set_arg_types
> AppRef.SpellingOptions.IgnoreCaps=0
> com.set_arg_types("s t t ",1)
> win.debug(AppRef.CheckSpelling("HAX"),"(s/b 0)", com_status)
> com.unload
>


Reply via email to