<script>
function Wordcontorl () {
Alert ("Little Meng Jia's Baby");
var wordapp=new activexobject ("Word.Application");
var wdcharacter=1
var wdorientlandscape = 1
Wordapp.application.visible=true; Whether to eject the generated word after execution completes
var mydoc=wordapp.documents.add ();//Create a new blank document
WordApp.ActiveDocument.PageSetup.Orientation = wdorientlandscape//page orientation is set to landscape
WordApp. Selection.paragraphformat.alignment=1//1 Center Alignment, 0 to right
WordApp. Selection.font.bold=true
WordApp. Selection.font.size=20
WordApp. Selection.TypeText ("Meng Jia incense");
WordApp. Selection.MoveRight (wdcharacter); The cursor moves the character right
WordApp.Selection.TypeParagraph ()//Insert Paragraph
WordApp. Selection.font.size=12
WordApp. Selection.TypeText ("written-----Zhu Yu"); Branch Insert Date
WordApp.Selection.TypeParagraph ()//Insert Paragraph
Table of the Var mytable=mydoc.tables.add (WordApp.Selection.Range, 8,7)//8 row 7 columns
mytable.style= "Grid Type"
var aa = "Meng Jia title"
var Tablerange; Here's how to assign a value to a cell in a table
for (i= 0;i<7;i++)
{
With (Mytable.cell (1,i+1). Range)
{
Font. Size = 12;
InsertAfter (AA);
ColumnWidth =4
}
}
for (n =0;n<7;n++)
{
for (i =0;i<7; i++)
{
With (Mytable.cell (i+2,n+1). Range)
{font. Size = 12;
InsertAfter (www.111cn.net);
}
}
}
Row_count = 0;
Col_count = 0
Mydoc.protect (1)
}
Wordcontorl ()
</script>