DHTML editing control C# problem

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!
 
M

Michael Smith

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!


.
 
J

Jon Davis

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top