Sets or gets the media types of the document to receive.
Syntax:
<sAcceptTypes> = object.ReceiveAcceptTypes
object.ReceiveAcceptTypes= <sAcceptTypes>
Example:
Dim oEdiDoc As Fredi.ediDocument
Dim oTransports As Fredi.ediTransports
Dim oTransport As Fredi.ediTransport
Dim oHttpCfg As Fredi.ediHttpCfg
Dim sAcceptTypes As String
' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument
' Get transports object
Set oTransports = oEdiDoc.GetTransports
' Create single transport object for receiving document.
Set oTransport = oTransports.CreateTransport
' Get the HTTP config object.
Set oHttpCfg = oTransport.GetHttpCfg
' Get the HTTP accept types
sAcceptTypes = oHttpCfg.ReceiveAcceptTypes
Debug.Print "HTTP Accept Types: " & sAcceptTypes
' Change HTTP accept type to "*/*"
oHttpCfg.ReceiveAcceptTypes = "*/*"
' Set required parameters for the download.
oTransport.SetHTTP
oTransport.User = "Username"
oTransport.Password = "Password"
oTransport.Address = "255.255.255.1"
oTransport.TargetPath = "/test_folder/"
' Receive file.
oTransport.Receive "SampleEdiX12_850.X12"
oEdiDoc.Save App.Path & "\Output.Txt"
MsgBox "Done"