Automation object argument type mismatch Error

Hi All, Automation object argument type mismatch

Error Has come when I Have give print command through lotus notes

My Code is :-

word.ActiveDocument.PrintOut  FileName="" , Range=wdPrintRangeOfPages, Item= _

wdPrintDocumentContent, Copies=1, Pages="1-5"

does these is any other way to give print word file through lotus – script code which will print particular page in word file without opening print dialog box.

I have found this code in word macro. But it not run well in lotus. Please guide

Subject: Automation object argument type mismatch Error

I don;t think you can use MS constants within script - you need to find the numerical equivalent for wdPrintRangeOfPages etc

Subject: RE: Automation object argument type mismatch Error

Also, you forgot to use Option Declare.

Even if you substitute in appropriate literals, the way you wrote your statement doesn’t make any sense. The expression x=somevalue is of type Boolean, and I’m sure PrintOut method is not expecting only true/false arguments. You can’t label your arguments in LotusScript, you must just list them out in order. And by the way, even in a word macro (which is where I think you’re getting this syntax), you label them with :=, not =