高分请教怎样用VBA实现Outlook自动收发?

gqianshan77 2006-08-02 04:35:56
请高手给出代码
谢谢
...全文
446 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
senventt 2006-11-27
  • 打赏
  • 举报
回复
http://www.everythingaccess.com/tutorials.asp?ID=Outlook-Send-E-mail-Without-Security-Warning
kingsang 2006-08-16
  • 打赏
  • 举报
回复
强,学习
TechnoFantasy 2006-08-05
  • 打赏
  • 举报
回复
通过下面的VBA代码可以创建一个新邮件并发送:

Sub CreateHTMLMail()
'Creates a new e-mail item and modifies its properties

Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Set olApp = Outlook.Application
'Create e-mail item
Set objMail = olApp.CreateItem(olMailItem)

With objMail
'Set body format to HTML
.BodyFormat = olFormatHTML
.HTMLBody = "<HTML><H2>The body of this message will appear in HTML.</H2><BODY>Please enter the message text here. </BODY></HTML>"
.Send
End With

End Sub

2,506

社区成员

发帖
与我相关
我的任务
社区描述
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
社区管理员
  • VBA
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧