phmg.net
当前位置:首页 >> ExCEl 求助,ExCEl vBA 调用outlook代码问题 >>

ExCEl 求助,ExCEl vBA 调用outlook代码问题

具体啥问题?代码贴出来看看呗

Dim xlApp as Objectset xlapp = CreateObject("Excel.Application")'注意这里必须确认“某工作簿”已经打开,否则下面的代码依然会出错!'通常情况下我会这么做:Dim wb as objectFor wb in xlapp.Workbooks if wb.name = "某工作不.xls" then Got...

参考下面的VBA代码 Sub Send_Email() Dim i As Integer Dim MyOutlookApp As Outlook.Application Dim MyFolder As Outlook.MAPIFolder Dim MyNewMail As Outlook.MailItem Dim MyAttachments As Outlook.Attachments '附件 Set MyOutlookApp = ...

参考下面的VBA代码 Sub Send_Email() Dim i As Integer Dim MyOutlookApp As Outlook.Application Dim MyFolder As Outlook.MAPIFolder Dim MyNewMail As Outlook.MailItem Dim MyAttachments As Outlook.Attachments '附件 Set MyOutlookApp = ...

我是用office2010的,打开outlook后点文件-选项-信任中心-信任中心设置-编程访问-寻从不向我发送……”。选这个有一定的危险性,容易被病毒使用你的邮箱。

建议换个方式 你可以在excelvba里面编程, 调用outlook发送邮件即可 以前做过,现在东西找不到了,资料直接baidu就可以了

'将发件箱中的邮件发送出去 Sub subSendEmail() On Error Resume Next Dim fld_OutBox As Outlook.MAPIFolder Dim objItems As Outlook.Items Dim myItem As Object Dim myItems() As Object Dim iIndex As Integer iIndex = 0 Dim n As Integer...

Set objOutlook = GetObject(, "Outlook.Application") Set objMail = objOutlook.Createitem(olmailitem) With objMail .To = ToMail .Subject = "标题" .HTMLBody = "内容" .display .send End With

MAPISession1.SignOn 'MAPI1.MsgType = 1 'how to send html code ? 'MAPI1. = mailsvr.Text MAPI1.SessionID = MAPISession1.SessionID MAPI1.MsgIndex = -1 MAPI1.RecipAddress = mailto.Text 'MAPI1.RecipDisplayName = mailto.Text 'MAPI1.M...

1、有可能是没有添加引用? 2、有可能是office软件没有安装outlook这项。可以在控制面板里重新安装一下。

网站首页 | 网站地图
All rights reserved Powered by www.phmg.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com