【发布时间】:2015-05-19 05:56:48
【问题描述】:
我创建了以下代码,它会自动通过电子邮件发送工作簿,我想在发送日期后 2 天使用发件人跟进标记已发送的电子邮件,以提醒我在 2 天内跟进已发送的电子邮件。
我查看了其他论坛但没有成功,我发现的代码只为收件人设置了标志。
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String
Dim wb As Workbook
Dim FileName As String
Dim wSht As Worksheet
Dim ShtName As String
Dim ws As Worksheet
ActiveWorkbook.SaveCopyAs ThisWorkbook.Path & "\" & "File Name " & Format(Now, "dd-mm-yy") & ".xlsm"
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.createitem(0)
strbody = " Please see the attached spreadsheet.
" & _"Please don't hesitate to contact me if you have any questions.
"
'Change only Mysig.htm to the name of your signature
SigString = Environ("appdata") & _
"\Microsoft\Signatures\Expediting Officer.htm"
If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = ""
.HTMLBody = strbody & "
" & Signature
.display
.Attachments.Add ("File location"\"File Name " & Format(Now, "dd-mm-yy") & ".xlsm")
.display
.Importance = 2
End With
【问题讨论】:
-
This 你在尝试什么?
-
感谢您的回复。链接上的代码似乎用于在 Outlook 中工作。我们想在上面显示的代码中添加代码,将发件人电子邮件中的跟进标记为 2 天。