Attaching HTML file as email in VB 6.0

I am trying to attach an html file file to email using Visual Basic 6.0. when the cursor is comes on **Open strFile For Binary Access Read As #hFile** line it gives error "**Error encoding file - Bad file name or number**". Please all your help and support would be highly appreciated. Dim handleFile As Integer Dim strValue As String Dim lEventCtr As Long handleFile = FreeFile Open strFile For Binary Access Read As #handleFile Do While Not EOF(hFile) ' read & Base 64 encode a line of characters strValue = Input(57, #handleFile) SendCommand EncodeBase64String(strValue) & vbCrLf ' DoEvents (occasionally) lEventCtr = lEventCtr + 1 If lEventCtr Mod 50 = 0 Then DoEvents Loop Close #handleFile Exit Sub File_Error: Close #handleFile m_ErrorDesc = "Error encoding file - " & Err.Description Err.Raise Err.Number, Err.Source, m_ErrorDesc End Sub

以上就是Attaching HTML file as email in VB 6.0的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准