Dim OutL As New Outlook.Application
不就可以用了吗

解决方案 »

  1.   

    通过API函数ShellExecute再加上一些参数就可以实现发送带附件的邮件,下面是范例: 
    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 
    Private Const SW_SHOW = 5 Private Sub Command1_Click() 
    Debug.Print "[email protected]?subject=MySubject&Attach=""""c:\doc1.doc""""" 
    Call ShellExecute(Me.hwnd, "open", _ 
    "[email protected]?subject=MySubject&Attach=""c:\doc1.doc""", _ 
    vbNullString, vbNullString, SW_SHOW) 
    End Sub 
    上面的程序将 c:\doc1.doc 作为附件发送出去,上面的代码在OutLook 2000以及 Outlook Exress 5.5下运行通过