DoCommandEx
Executes a command with the specified factor.
Syntax
HRESULT DoCommandEx(
BSTR cmdstr
BSTR paramstr
);
Parameters
cmdstr
[in] Keyword of the command.
paramstr
[in] Factor of the Keyword of the command. Below are commands supporting parameters. Insert
a pipe (|) to separate parameters if there are more than two parameters.
|
Commands
|
Parameters
|
|
paralist
|
normal, h1, h2, h3, h4, h5, h6, pre
|
|
fontlist
|
Font name
|
|
charcolor
|
#RRGGBB
|
|
charbgcolor
|
#RRGGBB
|
|
fontsizelist
|
Font size
|
|
lineheight
|
xxx (Default value is %)
|
|
file_open
|
File name/ URL of the file
|
|
file_save_as
|
File name
|
|
print
|
File name to print (Defaults to the current file if not specified.)
|
|
image
|
Path of the image file (src) Description of the image (alt) Alignment of the image (align) Width of the image (width) Height of the image (height) Horizontal spacing (hspace) Vertical spacing (vspace) Width of the border around the image (border) Style of the image (style)
|
|
table_new
|
Number of rows (row) Number of columns (col) Width of the table (width) Height of the table (height) Alignment of the table (align) Cell padding (cellpadding) Cell spacing (cellspacing) Thickness of the table border (border) Color of the table border (bordercolor) Light border
(bordercolorlight) Dark border (bordercolordark) Background color of the table (bgcolor) Background image (background) Style of the table (style)
|
Return Values
0 (always)
Remarks
Using a command without a factor will have the same result as that of
DoCommand. Insert a pipe ( | ) to separate parameters if there are more than two parameters. Insert
two pipes ( || ) for factors that you don't want to use.
Sample Codes
VBScript
dim object
Set object = document.editForm
object.wec.DoCommandEx "image" "C:\img.jpg|Image|left|100|100|1||0||"
MsgBox "An image has been inserted."
End If
...
See Also
DoCommand
|