DHTML editing control C# problem

  • Thread starter Thread starter len smith
  • Start date Start date
L

len smith

I'm having problems using the DHTML control's ExecCommand() in C#.

Here are the parameters ExecCommand takes:
object.ExecCommand cmdID [, cmdExecOpt] [, pInVar]

Intellisense tells me I want to us a "ByRef pInVar as Object"

The SDK says pInVar is:
pInVar

Input parameter for the command, if any. This parameter is not
required >for all commands. If it is included, the cmdExecOpt parameter
must be >included as well.

I have no idea what to pass it! I don't have this problem with Visual
Basic because Visual Basic allows for optional parameters! Please help!
 
some commands require this third parameter, so you can
pass it as an object. for example, if you wanted to save
the document to a file, you would write
object fileNameObj = "c:\\somefile";
object.execCommand("SaveAs", false, fileNameObj);

if the command does not require this parameter, you can
use
System.Reflection.Missing.Value missingValue =
System.Reflection.Missing.Value;
and pass that in. I think you can also pass in a null
object.
hope that helps.
-michael


-----Original Message-----
I'm having problems using the DHTML control's ExecCommand () in C#.

Here are the parameters ExecCommand takes:
object.ExecCommand cmdID [, cmdExecOpt] [, pInVar]

Intellisense tells me I want to us a "ByRef pInVar as Object"

The SDK says pInVar is:
pInVar

Input parameter for the command, if any. This
parameter is not
required >for all commands. If it is included, the cmdExecOpt parameter
must be >included as well.

I have no idea what to pass it! I don't have this problem with Visual
Basic because Visual Basic allows for optional parameters! Please help!


.
 
Try null. ;)

Jon

len smith said:
I'm having problems using the DHTML control's ExecCommand() in C#.

Here are the parameters ExecCommand takes:
object.ExecCommand cmdID [, cmdExecOpt] [, pInVar]

Intellisense tells me I want to us a "ByRef pInVar as Object"

The SDK says pInVar is:
pInVar

Input parameter for the command, if any. This parameter is not
required >for all commands. If it is included, the cmdExecOpt parameter
must be >included as well.

I have no idea what to pass it! I don't have this problem with Visual
Basic because Visual Basic allows for optional parameters! Please help!
 
Back
Top