Option Explicit |
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 |
Sub SendMail() |
On Error GoTo err |
Dim MyMail As String |
MyMail = "mailto:Chauncey.Wang@finisar.com?subject=Hello Chauncey&body=Good Morning........:%0A1:%0A2:%0A3:%0A" _ |
& Space(20) & "user: " + Environ( "username" ) & "%0A" & Space(20) & "Date: " & Date |
'%0A 换行 ;?subject 标题 ;&body 正文 |
ShellExecute 0&, vbNullString, MyMail, vbNullString, vbNullString, 1 |
End |
err: |
MsgBox "You don't have E-Mail App installed in the local PC!" |
End Sub |
初级程序员
by: 摄影 发表于:2020-05-10 01:02:47 顶(0) | 踩(0) 回复
用不了
回复评论