Dim wdc As New WordCreator()
Dim txt As String
For i As Integer = 1 To 5
txt = txt & "Foxtable不仅是一个优秀的应用软件,同时又是一个高效率的开发工具。"
Next
For i As Integer = 1 To 5
With wdc.AddParagraph(txt, New Font("宋体", 9))
.ForeColor = Color.Green
.FirstLineIndent = 20 '首行缩进20
.SpaceBetweenLines = 10 '行距为10
.Alignment = Word.RtfHorizontalAlignment.Justify '文本两端对齐
End With
Next
Dim rc As New System.Drawing.RectangleF(250, 50, 150, 100) '定义一个矩形,用于指定绘制位置和尺寸
Dim pgf As New Word.Objects.RtfParagraph()
Dim fnt As New Font("宋体", 12)
pgf.Add(New Word.Objects.RtfString("日期:2025年02月28日" & vbCrLf & "签名 :张三", fnt))
wdc.DrawParagraph(rc, pgf)
rc = New System.Drawing.RectangleF(250, 50, 200, 200)
wdc.DrawImage( getimage("印章.png"), rc)
Dim fl As String = "d:\问题\test.docx"
wdc.Save(fl)
Process.Start(fl)