老师,麻烦看看下面代码哪里出现问题了?
Dim f1 As String = ProjectPath & "Attachments\登记表1.doc"'指定模板文件
Dim f2 As String = ProjectPath & "Reports\登记表11.doc"'指定目标文件
Dim App As New MSWord.Application
Dim doc As Object = app.Documents.Open(f1)
Dim item = "【盖章】"
Dim sel = app.Selection
sel .Find.ClearFormatting
sel .Find.Text = item
sel.Find.Execute
Dim obj = sel.Range
Dim s = doc.Shapes.AddPicture("Attachments\电子印章副本.png", False, True, 300, 0, 100, 100, obj)
s.WrapFormat.Type = MSWord.WdWrapType.wdWrapFront
app.visible = False
doc.SaveAs(Filename:=f2)
app.quit