excel - 为什么附件方法不能正常工作
问题描述
我在运行该方法时遇到问题.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
需要根据范围值附加文件吗?
非常感谢。
解决方案
推荐阅读
- javascript - 每当将可选道具发送到子组件时显示错误
- sql - SQL 之间 + OR 慢
- swiftui - 通过 Swiftui 中的 QLpreviewcontroller 快速查看预览
- loops - 在 Google 表格中复制和粘贴移动范围
- android-automotive - 如何从正在运行的服务启动活动
- python - Pandas 数据从 500,000,000 变为 5000000000
- python - 运行程序python时出错,
- java - 如何使用流/ifPresent 对 java.util.Set 中的每个项目执行操作?
- excel - Excel 工作簿以只读方式打开,因为连接文件
- java - 将 VS Code 配置为在进行实时语法检查时使用 .jar 文件