Document.exe ccommand () function available parameters (sorting and Collection)

Source: Internet
Author: User
2d-position allows you to move an absolute position object by dragging it.
Absoluteposition: Set the position attribute of the element to "absolute" (absolute ).
Set backcolor or obtain the background color of the selected area.
Blockdirltr is not yet available Supported .
Blockdirrtl is not currently supported.
Bold switches whether the selected area is in bold or not.
Browsemode is not currently supported.
COPY Copies the selected area to the clipboard.
Createbookmark: Create a bookmarks anchor to obtain the name of the bookmarks anchor of the selected area or insert point.
CreateLink inserts a hyperlink in the selected area or displays a dialog box that allows you to specify the URL of the hyperlink to be inserted for the selected area.
Cut: copy the selected area to the clipboard and delete it.
Delete deletes the selected area.
Dirltr is not currently supported.
Dirrtl is not currently supported.
Editmode is not supported currently.
Fontname: set or obtain the font of the selected area.
Fontsize: set or obtain the font size of the selected area.
Set or obtain the foreground (text) color of the selected area.
Formatblock sets the formatting label of the current block.
Indent Chinese Indent of the current.
Inlinedirltr is not currently supported.
Inlinedirrtl is not currently supported.
Button Control for insertbutton Overwrite The selected area.
Insertfieldset overwrites the selected area with a box.
Inserthorizontalrule overwrites the selected area with a horizontal line.
Insertiframe overwrites the selected area with an embedded frame.
Insertimage Image Overwrite the selected area.
Insertinputbutton overwrites the selected area with a button control.
Insertinputcheckbox overwrites the selected area with the check box control.
Insertinputfileupload overwrites the selected area with the file upload control.
Insertinputhidden inserts a hidden control to overwrite the selected area.
Insertinputimage overwrites the selected area with an image control.
Insertinputpassword overwrites the selected zone with a password control.
Insertinputradio overwrites the selected area with a single-choice button control.
Insertinputreset overwrites the selected area with the Reset Control.
Insertinputsubmit overwrites the selected area with the submit control.
Insertinputtext overwrites the selected area with a text control.
Insertmarquee overwrites the selected area with empty subtitles.
Insertorderedlist: select the number list or regular formatting block for the selected area.
Insertparagraph overwrites the selected area with a line break.
Insertselectdropdown overwrites the selected area with the drop-down box control.
Insertselectlistbox overwrites the selected area with the list box control.
Inserttextarea overwrites the selected area with the multi-line text input control.
Insertunorderedlist Project The symbol list or regular formatting block.
Italic switch to whether the selected area is displayed in italic or not.
Justifycenter: place the selected area in the formatting block.
Justifyfull is not currently supported.
Justifyleft: Align the formatting block of the selected area to the left.
Justifynone is not currently supported.
Justifyright: Right-aligned the formatting block of the selected area.
Liveresize forces the mshtml editor to continually update the appearance of Elements During Scaling or movement, instead of updating the elements only after moving or scaling.
Multipleselection allows you to select more than one optional site element at a time when you press shift or Ctrl.
Open is not yet supported.
Outdent reduces the indentation of the formatting block where the selected area is located.
Overwrite switches the insert and overwrite of the text status.
Paste overwrites the selected area with the clipboard content.
Playimage is not currently supported.
Print opens the Print dialog box so that you can print the current page.
Redo is not currently supported.
Refresh refresh the current document.
Removeformat deletes the format tag from the selected area.
Removeparaformat is not supported currently.
Saveas saves the current web page as a file.
Selectall: select the entire document.
Currently, sizetocontrol is not supported.
Currently, sizetocontrolheight is not supported.
Currently, sizetocontrolwidth is not supported.
Stop is not supported currently.
Stopimage is not currently supported.
Strikethrough is not currently supported.
Subscript is not currently supported.
Superscript is not currently supported.
Unbookmark deletes all bookmarks from the selected area.
Underline switches whether the underline of the selected area is displayed.
Undo is not currently supported.
Unlink deletes all hyperlinks from the selected area.
Unselect clears the selected status of the selected area.
In addition Code
Try to change Parameters Some other functions are available:

Webbrowser. execwb () Open
Webbrowser. execwb () Close all existing IE Windows and open a new window
Webbrowser. execwb (4, 1) Save Webpage
Webbrowser. execwb (6, 1) print
Webbrowser. execwb (7,1) print preview
Webbrowser. execwb (8, 1) print page settings
Webbrowser. execwb (10, 1) view page properties
Select All webbrowser. execwb (17,1)
Webbrowser. execwb (22, 1) Refresh
Webbrowser. execwb () Close form no prompt
//
I have sorted out the execwb METHOD OF THE iewebbrowser component and hope to help you.
1. <Object ID = "webbrowser" width = 0 Height = 0 classid = "CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2"> </Object>
2. Call the method.
Webbrowser. execwb n1_id, ncmdexecopt, [pvain], [pvaout]
3. parameter description.
(A). n1_id
Olecmdid_open = 1,
Olecmdid_new = 2,
Olecmdid_save = 3,
Olecmdid_saveas = 4,
Olecmdid_savecopyas = 5,
Olecmdid_print = 6,
Olecmdid_printpreview = 7,
Olecmdid_pagesetup = 8,
Olecmdid_spell = 9,
Olecmdid_properties = 10,
Olecmdid_cut = 11,
Olecmdid_copy = 12,
Olecmdid_paste = 13,
Olecmdid_pastespecial = 14,
Olecmdid_undo = 15,
Olecmdid_redo = 16,
Olecmdid_selectall = 17,
Olecmdid_clearselection = 18,
Olecmdid_zoom = 19,
Olecmdid_getzoomrange = 20
Olecmdid_updatecommands = 21
Olecmdid_refresh = 22
Olecmdid_stop = 23
Olecmdid_hidetoolbars = 24
Olecmdid_setprogressmax = 25
Olecmdid_setprogresspos = 26
Olecmdid_setprogresstext = 27
Olecmdid_settitle = 28
Olecmdid_setdownloadstate = 29
Olecmdid_stopdownload = 30
The above keywords can all be found in the menu of the browser. You can see it at a glance ﹗
(B). ncmdexecopt
Olecmdexecopt_dodefault = 0,
Olecmdexecopt_promptuser = 1,
Lecmdexecopt_dontpromptuser = 2,
Olecmdexecopt_showhelp = 3
For this parameter, select 1.
Function printpr ()
{
VaR olesponid = 7;
/* Oleateid values:
* 6-print
* 7-print preview
* 1-open window
* 4-Save
*/
VaR prompt = 1; // 2 dontpromptuser
VaR webbrowser = '<Object ID = "webbrowser1" width = 0 Height = 0 classid = "CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2"> </Object> ';
Document. Body. insertadjacenthtml ('foreend', webbrowser );
Webbrowser1.execwb (oleodiid, prompt );
Webbrowser1.outerhtml = "";
}

// Print preview attribute settings
<Object ID = "Factory" style = "display: none" viewastext classid = "CLSID: 1663ed61-23eb-11d2-b92f-008048fdd814"> </Object>
<SCRIPT defer>
Function window. onload (){
Factory. Printing. header = ""
Factory. Printing. footer = ""
Factory. Printing. Portrait = false; // use the custom Direction (True: horizontal/false: horizontal)
Factory. Printing. papersize = "A3"
Factory. Printing. leftmargin = 0
Factory. Printing. topmargin = 0
Factory. Printing. rightmargin = 0
Factory. Printing. bottommargin = 0
}
</SCRIPT>

<P> <input type = button value = "print this page" onclick = "location. href = 'javascript: window. Print () '">

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.