C
Carlos
Hmm it should be fairly simple i guess, but im stuck big time.
Cant seem to find iDataSource anywhere.
What im trying to do is to read a textfile (mail.mai) into an CDO
Mailmessage object. So that
i can modify it from there. Ive found this sample from ms, but.. im stuck.
could anyone translate ?
Function LoadMessageFromFile(Path) 'As Message
Dim Stm
Set Stm = CreateObject("ADODB.Stream")
Stm.Charset = "ascii"
Stm.Open
Stm.LoadFromFile Path
Dim iMsg
Set iMsg = CreateObject("CDO.Message")
Dim iDsrc
Set iDsrc = iMsg.GetInterface("IDataSource")
iDsrc.OpenObject Stm, "_Stream"
Set LoadMessageFromFile = iMsg
End Function
Thanx in advance.
//Carlos
Cant seem to find iDataSource anywhere.
What im trying to do is to read a textfile (mail.mai) into an CDO
Mailmessage object. So that
i can modify it from there. Ive found this sample from ms, but.. im stuck.
could anyone translate ?
Function LoadMessageFromFile(Path) 'As Message
Dim Stm
Set Stm = CreateObject("ADODB.Stream")
Stm.Charset = "ascii"
Stm.Open
Stm.LoadFromFile Path
Dim iMsg
Set iMsg = CreateObject("CDO.Message")
Dim iDsrc
Set iDsrc = iMsg.GetInterface("IDataSource")
iDsrc.OpenObject Stm, "_Stream"
Set LoadMessageFromFile = iMsg
End Function
Thanx in advance.
//Carlos