
how i send attachment in the biginnig when sending the mail with olemsg32.dll
hello!
i use vb5 with win95
i using olemsg32.dll to send outlook message.
i also use writertf.dll to write richtext to the message body .
when using this method, how can i position the attachment to the begging
of the body of the mail.
.positoin = 1 , doesnt do it.
code example
(createnewmessage is a sub that create the new message)
Set oSession = CreateObject("MAPI.SESSION")
oSession.Logon
CreateNewMessage
oMessage.Subject ="ttt"
Set oAttach = oMessage.Attachments.Add
With oAttach
.Name = Fname
.Type = mapiFileData
.ReadFromFile Fname
.Position = 1
End With
oMessage.Update
'Set the RTF property
bRet = WriteRTF(oSession.Name, oMessage.ID, _
oMessage.StoreID, Rtext.TextRTF)
Set oMessage = Nothing
Set oMsgFilter = oSession.Outbox.Messages.Filter
oMsgFilter.Fields(ActMsgPR_ENTRYID) = MessageID
Set oMessage = oSession.Outbox.Messages.GetFirst
' Clear the Message Filters
Set oMsgFilter = Nothing
Set oSession.Outbox.Messages.Filter = Nothing
' Send the message
oMessage.Send
Any ideas ?
regars
marlin boiman
mail: