我試圖在發送自動發送電子郵件時使用我的默認簽名,有沒有辦法可以修復我的代碼?我的代碼最終粘貼簽名的位置而不是簽名本身。請指教。電子郵件宏中的簽名
Sub CreateEmailForGTB()
Dim wb As Workbook
Set wb = Workbooks.Add
ThisWorkbook.Sheets("BBC").Copy After:=wb.Sheets(1)
'save the new workbook in a dummy folder
wb.SaveAs "location.xlsx"
'close the workbook
ActiveWorkbook.Close
'open email
Dim OutApp As Object
Dim OutMail As Object
Dim newDate: newDate = Format(DateAdd("M", -1, Now), "MMMM")
Dim sigstring As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
sigstring = Environ("appdata") & _
"\Microsoft\Signatures\zbc.htm"
'fill out email
With OutMail
.To = "[email protected];"
.CC = "[email protected];"
.BCC = ""
.Subject = "VCR - CVs for BBC " & "- " & newDate & " month end."
.Body = "Hi all," & vbNewLine & vbNewLine & _
"Please fill out the attached file for " & newDate & " month end." & vbNewLine & vbNewLine & _
"Looking forward to your response." & vbNewLine & vbNewLine & _
"Many thanks." & vbNewLine & vbNewLine & _
sigstring
您可以發佈剩餘的'With OutMail'代碼嗎? – 0m3r