Steps to reproduce the problem
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
- Save the following code to an HTML file.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR><SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function button1_onclick() {
var selArea = ActiveXEditor.DOM.selection.createRange();
var t = "";
t += '<TABLE cellSpacing=1 cellPadding=1 width="75%" border=1>';
t += ' <TR>';
t += ' <TD>a</TD>';
t += ' <TD>b</TD></TR>';
t += ' <TR>';
t += ' <TD>c</TD>';
t += ' <TD>d</TD></TR>';
t += ' <TR>';
t += ' <TD>c</TD>';
t += ' <TD>d</TD></TR></TABLE>';
selArea.pasteHTML( t );
}
function button2_onclick() {
ActiveXEditor.ExecCommand(5047, 2);
}
//-->
</SCRIPT>
</HEAD>
<BODY LANGUAGE=javascript >
<OBJECT id=ActiveXEditor classid=clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A
width="100%" height=200 VIEWASTEXT><PARAM NAME="ActivateApplets" VALUE="0"><PARAM NAME="ActivateActiveXControls" VALUE="0"><PARAM NAME="ActivateDTCs" VALUE="-1"><PARAM NAME="ShowDetails" VALUE="0"><PARAM NAME="ShowBorders" VALUE="0"><PARAM NAME="Appearance" VALUE="1"><PARAM NAME="Scrollbars" VALUE="-1"><PARAM NAME="ScrollbarAppearance" VALUE="1"><PARAM NAME="SourceCodePreservation" VALUE="-1"><PARAM NAME="AbsoluteDropMode" VALUE="0"><PARAM NAME="SnapToGrid" VALUE="0"><PARAM NAME="SnapToGridX" VALUE="50"><PARAM NAME="SnapToGridY" VALUE="50"><PARAM NAME="UseDivOnCarriageReturn" VALUE="0"></OBJECT>
<INPUT type=button value="Insert table" id=button1 name=button1 LANGUAGE=javascript onclick="return button1_onclick()">
<INPUT id=button2 type=button value="Split cell" name=button2 LANGUAGE=javascript onclick="return button2_onclick()">
- Open the HTML file in Microsoft Internet
Explorer.
- Put the insertion point below the table.
- Click Insert table to insert a table.
- Put the insertion point in the first cell. (The first cell contains a.)
- Click Split cell.
- Put the insertion point in the empty cell that you created in step 6.
- Click Split cell.
The table has more columns in the selected row
than in the rows that are not selected.