petty 发表于 2004-6-10 19:28:00

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

各位大侠,我想在自己的应用程序中加入自己的邮箱,请教VBA中如何实现点击程序中某一控件自动打开outlook向作者发信的功能?

efan2000 发表于 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<BR>Const SW_SHOWNORMAL = 1<BR>Private Sub Form_Load()<BR>                       'Send an E-Mail to the        efan2000<BR>                       ShellExecute 0, vbNullString, "<A href="mailto:efan2000@sohu.com" target="_blank" >mailto:efan2000@sohu.com</A>", vbNullString, "C:\", SW_SHOWNORMAL<BR>End Sub<BR>

efan2000 发表于 2004-6-11 20:47: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 theefan2000
       ShellExecute 0, vbNullString, "mailto:efan2000@sohu.com", vbNullString, "C:\", SW_SHOWNORMAL
End Sub

petty 发表于 2004-6-12 14:22:00

谢谢,真是高手。
页: [1]
查看完整版本: 请教VBA中如何实现点击某一控件自动打开outlook向作者发信的功能?