不知道是不是你要的代码
'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 LongPrivate Sub SendMail(Optional Address As String, _
    Optional Subject As String, Optional Body As String, _
    Optional CC As String, Optional BCC As String)    Dim strCommand As String
    
    'Build up the mail string
    If Len(Subject) Then strCommand = "&Subject=" & Subject
    If Len(Body) Then strCommand = strCommand & "&Body=" & Body
    If Len(CC) Then strCommand = strCommand & "&CC=" & CC
    If Len(BCC) Then strCommand = strCommand & "&BCC=" & BCC
    
    'Replace the first ampersand, if any,
    'with a question 
    If Len(strCommand) Then
        Mid(strCommand, 1, 1) = "?"
    End If
    
    'Add mailto: command and main e-mail
    'address to the command string
    strCommand = "mailto:" & Address & strCommand
    
    'Execute command via the API
    Call ShellExecute(Form1.hwnd, "open", strCommand, _
        vbNullString, vbNullString, SW_SHOWNORMAL)End SubPrivate Sub Command1_Click()
Dim aaa As String
Dim bbb As String
Dim ccc As String
Dim ddd As String
Dim eee As String
aaa = "aa"
bbb = "bbb"
ccc = "ccc"
ddd = "ddd"
eee = "eee" SendMail aaa, bbb, ccc, ddd, eee
MsgBox aaa
MsgBox bbb
MsgBox ccc
MsgBox ddd
MsgBox eee
MsgBox xx
End Sub