我的代碼可以很好地從檔案夾中打開電子郵件,從電子郵件中提取 excel 表并將其保存到同一個檔案夾中,然后關閉訊息。我想做的是用一些具體的措辭回復那封電子郵件。我有下面的代碼,但它不作業。我知道它的“發件人”電子郵件地址,但我不知道我的錯誤在哪里。我確信這很簡單,但我只是不知道如何解決它。我在這里查看了很多主題,但似乎無法破解代碼。請幫我
Set Outapp = GetObject(, "Outlook.Application")
Set outEmail = Outapp.Session.OpenSharedItem(PORFQFolder & Filename)
For Each outAttachment In outEmail.Attachments
If outAttachment.Filename Like "*.xls*" Then
POUploadFile1 = PORFQFolder & outAttachment.Filename
outAttachment.SaveAsFile PORFQFolder & outAttachment.Filename
QuoteFile = "Y"
End If
Next
With outEmail
.ReplyAll
.to = .SenderEmailAddress
.HTMLbody = "Your quote has been received and processed."
.display
.send
End With
uj5u.com熱心網友回復:
.ReplyAll當您繼續使用收到的電子郵件時,該行實際上會創建一封新電子郵件......用With以下內容替換您的塊:
With outEmail.ReplyAll
.To = outEmail.SenderEmailAddress
.HTMLBody = "Your quote has been received and processed."
.Display
.Send
End With
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/522411.html
標籤:vba电子邮件毫秒访问
