https://docs.microsoft.com/en-us/previous-versions/exchange-server/exchange-10/ms526988(v=exchg.10)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
' Reference to Microsoft ActiveX Data Objects 2.5 Library ' Reference to Microsoft CDO for Windows 2000 Library 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 Function ExtractMessage(iBp As IBodyPart) As Message Dim iMsg As New CDO.Message Dim iDsrc As IDataSource Set iDsrc = iMsg iDsrc.OpenObject iBp, "IBodyPart" Set ExtractMessage = iMsg End Function Sub EmbedMessage(iMsg As CDO.Message, iBp As IBodyPart) Dim iDsrc Set iDsrc = iMsg.DataSource iDsrc.SaveToObject iBp, "IBodyPart" End Sub |
コメント