我在 MS ACCESS 中有一个数据库,其中我有一个包含一些计数的 ECount 字段有什么方法可以在 VBA 代码中拉出该调用,我正在生成一封新邮件,该邮件应该拉出邮件中的计数。
Private Sub Command_Click()
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Dim ThisDay As Date
ThisDay = Format(Now, "mm/dd/yy")
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.To = ""
.CC = ""
.Subject = "Daily Email Processed " *(Thisday)
.Body = "Hi," + vbNewLine + vbNewLine + vbNewLine + "Please find below the number of Emails processed for the " + vbNewLine + vbNewLine + "Email Count = " (**ECOUNT**) + vbNewLine + "O Count = " (**OCount**)
.Attachments.Add ""
.Attachments.Add ""
.Display
'.ReadReceiptRequested
End With