stingrae
Dec 9th, 2003, 07:18 PM
Hi,
I have a word document (saved as a .doc). In this word doc, there a various pictures and text.
When i use VB (dot net) to send this email through outlook, the text is sent ok, but the images are left behind.
here is part of the code:
strSubject = datEml("eml_Subject")
strType = datEml("eml_Type")
If strType = cemlText Then
strBody = datEml("eml_Body")
ElseIf strType = cemlHTML Then
' Dim strDB_Files_Path As String = Descriptions_Get("EMAIL_ATT_PATH")
If File.Exists(strDB_Files_Path & "\" & datEml("eml_Body")) = True Then
wrdDocOri = wrdApplication.Documents.Open(strDB_Files_Path & "\" & datEml("eml_Body"))
wrdSelection = wrdApplication.Selection
wrdDocOri.SaveAs(strTempPath, wdFormatHTML)
CType(wrdDocOri, Word._Document).Close()
Dim fs As New System.IO.FileStream(strTempPath, IO.FileMode.Open)
Dim sr As New System.IO.StreamReader(fs)
strBody = sr.ReadToEnd()
End If
End If
.
.
.
' Send eMail
Try
CType(otlMailItem, Outlook._MailItem).Send()
ClientNote_Add(DelimiterCheck(arrClientIDs(i)), "Email Out", strSubject, intEmailID)
Catch x As Exception
MessageBox.Show(x.Message, "Error Occurred!", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
how do i embed the images in there?
cheers
I have a word document (saved as a .doc). In this word doc, there a various pictures and text.
When i use VB (dot net) to send this email through outlook, the text is sent ok, but the images are left behind.
here is part of the code:
strSubject = datEml("eml_Subject")
strType = datEml("eml_Type")
If strType = cemlText Then
strBody = datEml("eml_Body")
ElseIf strType = cemlHTML Then
' Dim strDB_Files_Path As String = Descriptions_Get("EMAIL_ATT_PATH")
If File.Exists(strDB_Files_Path & "\" & datEml("eml_Body")) = True Then
wrdDocOri = wrdApplication.Documents.Open(strDB_Files_Path & "\" & datEml("eml_Body"))
wrdSelection = wrdApplication.Selection
wrdDocOri.SaveAs(strTempPath, wdFormatHTML)
CType(wrdDocOri, Word._Document).Close()
Dim fs As New System.IO.FileStream(strTempPath, IO.FileMode.Open)
Dim sr As New System.IO.StreamReader(fs)
strBody = sr.ReadToEnd()
End If
End If
.
.
.
' Send eMail
Try
CType(otlMailItem, Outlook._MailItem).Send()
ClientNote_Add(DelimiterCheck(arrClientIDs(i)), "Email Out", strSubject, intEmailID)
Catch x As Exception
MessageBox.Show(x.Message, "Error Occurred!", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
how do i embed the images in there?
cheers