Sets or gets the media type value in the “Content-Type” header.
Syntax:
<sMediaType> = object.MediaType
object.MediaType = < sMediaType >
Example:
Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oSubjMsg As Fredi.mailMessage
Dim oContentType As Fredi.mailContentType
Dim oParameters As Fredi.mailParameters
' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument
' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument
' Load EDI document normally.
oMailDocument.Load App.Path & "\SampleMail.TXT"
' Get subject message.
Set oSubjMsg = oMailDocument.GetMessage
' Get content type header.
Set oContentType = oSubjMsg.GetContentType
' Get the media type in the "Content-Type" header.
Debug.Print "MediaType: " & oContentType.MediaType
' Change the media type in the "Content-Type" header.
oContentType.MediaType = "Application"
oMailDocument.Save App.Path & "\Output.TXT"
MsgBox "Done"
Samples