明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1859|回复: 3

请教VBA中如何实现点击某一控件自动打开outlook向作者发信的功能?

[复制链接]
发表于 2004-6-10 19:28:00 | 显示全部楼层 |阅读模式
各位大侠,我想在自己的应用程序中加入自己的邮箱,请教VBA中如何实现点击程序中某一控件自动打开outlook向作者发信的功能?
发表于 2004-6-11 20:44:00 | 显示全部楼层
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
'Send an E-Mail to the efan2000
ShellExecute 0, vbNullString, "mailto:efan2000@sohu.com", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
发表于 2004-6-11 20:47:00 | 显示全部楼层
  1. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  2. Const SW_SHOWNORMAL = 1
  3. Private Sub Form_Load()
  4.        'Send an E-Mail to the  efan2000
  5.        ShellExecute 0, vbNullString, "mailto:efan2000@sohu.com", vbNullString, "C:", SW_SHOWNORMAL
  6. End Sub
 楼主| 发表于 2004-6-12 14:22:00 | 显示全部楼层
谢谢,真是高手。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-28 05:31 , Processed in 0.161047 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表