use of automation object methods with optional arguments 
Author Message
 use of automation object methods with optional arguments

use of automation object methods with optional argumentsJScript will only let you omit optional arguments at the end of the argument list.  You're stuck with specifying whatever the default values are for those that precede the one you want (or use VBScript instead ;-).

Michael Harris
MVP - Windows Script

I'm trying to use the PrintOut() method exposed by the Word.Application.Document object. It works fine when no parameters are passed (as in i can print word documents to the printer)..but if u check the object browser of Word then u can see that it can take optional arguments one of which is i've been trying to use this to print a word document to file but have been do i specify optional arguments when i call the PrintOut funtion..I'm using Windows Host Scripting with JScript ..there are many other optional arguments that can be passed but how do specify only the one i want(in this case the PrintToFile argument)


Sat, 17 Aug 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Optional Arguments For A .WSC-Defined Method

2. Passing optional object arguments from COM components

3. optional parameters in COM object methods

4. OL97 and passing arguments using automation

5. Passing arguments by reference to automation object

6. using methods with JScript objects stored in session object

7. optional arguments

8. Argument not optional

9. Optional arguments in vbscript

10. Optional argument in Function

11. Optional arguments for procedures?

12. Declaring a subroutine with optional arguments.


Powered by phpBB® Forum Software