为什么附件方法无法正常工作

时间:2019-04-29 03:54:27

标签: excel vba

我在运行方法.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

是否需要根据范围值附加文件?

非常感谢您。

0 个答案:

没有答案