Optional arguments

S

Sam

When calling Excel automation methods, eg Application.Run
in C# I can't seem to avoid having to specifiy values
(null) even for optional arguments. So when calling Run,
I have to specify all 30 optional arguments! Does anyone
know of a way to avoid having to do this?
 
A

Art Leonard [MSFT]

Sam said:
When calling Excel automation methods, eg Application.Run
in C# I can't seem to avoid having to specifiy values
(null) even for optional arguments. So when calling Run,
I have to specify all 30 optional arguments! Does anyone
know of a way to avoid having to do this?



Hi, Sam.
I am a developer in Office working on programmability in Office. I worked
on the PIAs in Office 2003 and XP, as well as international editing in
Office 2000 and XP.

There is currently no way to avoid this issue in the Office 2003 Primary
Interop
Assemblies. A suggestion would be to wrap the function call you are
interested in and provide the defaults you are interested in.

Thanks,
Art Leonard
 
Top