老师,能否自动提取表book1.xlsx中前10行的记录加到这邮件内容中,达到以下黄色标注的方式。谢谢!
Dim o As New Microsoft.Office.Interop.Outlook.Application
Dim msg As Microsoft.Office.Interop.Outlook.MailItem
msg = o.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
msg.Recipients.Add("sy@abx.com")
msg.Subject = "已经审核成功!!!"
Dim body As String = "<html><body>内容</body></html>"
Dim content As String = "< a href='Z:\\xxx\\Planl\\PriceTool.exe'>价格确认</ a>"
msg.HTMLBody = body.Replace("内容", "这儿可点击进入: "& content)
msg.Attachments.Add("C:\标准\book1.xlsx")
msg.Send()
MSGBOX("DONE")