C
chris
Hi,
I am have trouble opening an msg file that has attachments using CDO
My attachments are not loading correctly in the object model and
instead I get attachment added to the text body which is just a garbled
mess.
What I am trying to do is use CDO to open the msg file so I can look at
the number of attachments it has, but as the attachment is not loaded
into the attachments collection the count is not available to me. I am
using the following code to load the file:
Function LoadMessageFromFile(Path As String) As Message
Dim Stm As New Stream
Stm.Open
Stm.LoadFromFile Path
Dim iMsg As New CDO.Message
Dim iDsrc As IDataSource
Set iDsrc = iMsg
iDsrc.OpenObject Stm, "_Stream"
Set LoadMessageFromFile = iMsg
End Function
If anyone can help me I would appreciate it.
TIA
Chris
I am have trouble opening an msg file that has attachments using CDO
My attachments are not loading correctly in the object model and
instead I get attachment added to the text body which is just a garbled
mess.
What I am trying to do is use CDO to open the msg file so I can look at
the number of attachments it has, but as the attachment is not loaded
into the attachments collection the count is not available to me. I am
using the following code to load the file:
Function LoadMessageFromFile(Path As String) As Message
Dim Stm As New Stream
Stm.Open
Stm.LoadFromFile Path
Dim iMsg As New CDO.Message
Dim iDsrc As IDataSource
Set iDsrc = iMsg
iDsrc.OpenObject Stm, "_Stream"
Set LoadMessageFromFile = iMsg
End Function
If anyone can help me I would appreciate it.
TIA
Chris