现在的代码如下,可是好像红色的code不起作用 现在就是想询问一下对于修改文本的格式,如居中,修改字体这些如何实现 还有想给图片加黑色边框,如何用vbs实现 帮我一下吧,thx '******************************************************************************* Set Word = CreateObject("Word.Application") Word.Documents.Add Word.Selection.MoveDown 5, 1000 Word.Selection="统计结果" Word.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter Word.Selection.Style = Word.ActiveDocument.Styles("标题 1") Word.Selection.MoveDown 5, 1000 Word.Selection.TypeParagraph Word.Selection.MoveDown 5, 1000 Word.Selection="统计子项详细信息" Word.Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft Word.Selection.Style = Word.ActiveDocument.Styles("标题 2")
Word.Selection.MoveDown 5, 1000 Word.Selection.TypeParagraph Word.Selection.TypeParagraph Word.Selection ="11 12 13 14 15 16 "+ vbCrLf+ _ "21 22 23 24 25 26 "+ vbCrLf+ _ "31 32 33 34 45 46 "+ vbCrLf+ _ "41 42 43 44 45 56 " Word.Selection.ConvertToTable 100, 100, 0, 0 With Word.Selection.Tables(1) If .Style <> "网格型" Then .Style = "网格型" End If .ApplyStyleHeadingRows = True .ApplyStyleLastRow = True .ApplyStyleFirstColumn = True .ApplyStyleLastColumn = True End With Word.ActiveDocument.SaveAs ("test.doc") Word.Quit (False) Set Word = Nothing '******************************************************************************* |