1、创建word的table表,并且设置表的宽、对齐方式、字体等;
  2、往这个表中须序插入数据或表的某行某列中插入数据;不知各位兄弟有何高见,必有重谢!
分不够再加!

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/910/910934.xml?temp=.351742
      

  2.   

    //插入5列10行的表格
        ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=10, NumColumns:=5;
    //行高
        Selection.Tables(1).Select;
        Selection.Cells.SetHeight RowHeight:=10, HeightRule:=wdRowHeightAtLeast;
        With Selection.Rows do
        begin
            Alignment := wdAlignRowLeft;
            AllowBreakAcrossPages := True;
            SetLeftIndent LeftIndent:=CentimetersToPoints(0), RulerStyle:= wdAdjustNone;
        End
    //列高
        Selection.Cells.SetWidth ColumnWidth:=CentimetersToPoints(3.01), RulerStyle:=wdAdjustNone;
        Selection.Rows.SpaceBetweenColumns := CentimetersToPoints(0.38);
        Selection.Cells.SetHeight RowHeight:=10, HeightRule:=wdRowHeightAtLeast;
        With Selection.Rows do
        begin
            Alignment := wdAlignRowLeft;
            AllowBreakAcrossPages := True;
            SetLeftIndent LeftIndent:=CentimetersToPoints(0), RulerStyle:= wdAdjustNone;
        end;
    //对齐
        Selection.Tables(1).Select;
        Selection.ParagraphFormat.Alignment := wdAlignParagraphCenter;
    //字体
        Selection.Tables(1).Select;
        With Selection.Font do
        begin
            NameFarEast := "隶书";
            Size := 12;
            Bold := False;
            Italic := False;
        End
    //移到第三行第三列的位置输入text
        Selection.MoveDown Unit:=wdLine, Count:=3;
        Selection.MoveRight Unit:=wdCharacter, Count:=3;
        Selection.TypeText Text:="text";
      

  3.   

    多谢各位兄弟,
    其实有点我没有说得太清楚;
    我是要设置word表的某行某列的的宽度、对齐方式及字体;
    如第三行第四列的宽度为:5、对齐方式为:中间对齐
      

  4.   

    在word中建一个宏,跟踪一下不就完 了。