我在运行方法.Attachment.Add
时遇到问题。
For i = 1 To 2
ThisWorkbook.Sheets("Resumen").Range("F5").Value = i
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Item.To = ThisWorkbook.Sheets("Resumen").Range("B6").Value
.Item.Subject = ThisWorkbook.Sheets("Resumen").Range("B5").Value
.Attachment.Add ThisWorkbook.Sheets("Resumen").Range("B7").Value 'THIS LINE SHOW THE MISTAKE, "the object does not admit the method
.Introduction = "RESUME"
.Item.Send
End With
ActiveWorkbook.EnvelopeVisible = False
Next i
End Sub
是否需要根据范围值附加文件?
非常感谢您。