>>Conn.Provider = "ExOLEDB.DataSource"
要求在程序运行的机器上按装Exchange2000

解决方案 »

  1.   

    实际上,我要的就是一个文件下载功能。我很想知道不安装exchange的实现办法。请各位给出思路。
      

  2.   

    文件下载直接用VB的inet控件呀!
      

  3.   

    Dim strURL As String
    Dim bData() As Byte      '数据变量
    Dim intFile As Integer   '可用文件变量
    Dim i As Integer
    Dim ttt As String
    Timer1.Interval = 300    strURL =  "http://www.csdn.net/news/images/P7070049.jpg"
        intFile = FreeFile()      '将 intFile 设置为未使用的文件
        ' OpenURL 方法的结果首先传入 Byte 数组,
        '然后将 Byte 数组保存到磁盘。
        On Error Resume Next
        Kill App.Path & "\P7070049.jpg"
        On Error GoTo 0
        bData() = Inet1.OpenURL(strURL, icByteArray)
        Open App.Path & "\P7070049.jpg" For Binary Access Write As #intFile
            Put #intFile, , bData()
        Close #intFile
      

  4.   

    Microsoft Internet Transfer control 6.0
      

  5.   

    1.用VB创建一个DLL,代码如下:
    project2.class1:Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
    Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
        Dim lngRetVal As Long
        lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
        If lngRetVal = 0 Then DownloadFile = True
    End Function编译成project2.dll2.调用:
    Set objDL = CreateObject("Project2.Class1")
    objDL.DownloadFile "http://www.163.com/wwwimages/n/163logo.gif", "d:\2.jpg"