Dim wrdapp As Word.Application
Set wrdapp = New Word.ApplicationWith wrdapp
.Documents.Open Trim("c:\ddd")
.Visible = False
End WithWith wrdapp.ActiveDocument.Books.Item(1).Range.Text = Trim(rstx.Fields("qymc").Value)
.Books.Item(2).Range.Text = Trim(rstx.Fields("lxr").Value)
.Books.Item(3).Range.Text = Trim(rstx.Fields("lxdh").Value)
.Books.Item(4).Range.Text = Trim(rstx.Fields("email").Value)
.Books.Item(5).Range.Text = Trim(rstx.Fields("yjjy").Value)End Withwrdapp.ActiveDocument.PrintOut
wrdapp.ActiveDocument.Save'不做保存退出wrdapp.Quit SaveChanges:=True
Set wrdapp = Nothing