Framework EDI Reference. Methods and Properties
ediTransports. Send

Sends all files and messages that have been individually set up in each ediTransport objects in the collection.

Syntax:

Parameters:

Returns

Returns 1 if the operation completed successfully; otherwise 0 is returned.

Remarks

This method takes each of the ediTransport object in the collection and calls its Send method.  The sTargetFileName parameter is passed as parameter to each of the Send method.

The objects in the collection are processed in the order that they were added.  An ediTransport object is added using the CreateTransport method.

This method will stop processing the objects in the collection when it first encounters an error.  It is possible therefore to have all the files in the list to have been sent to their destination before the error was encountered.  All remaining objects will not be processed.

Example

Set oTransports = oEdiDoc.GetTransports

Set oTransport = oTransports.CreateTransport
oTransport.SetFTP ' FTP
oTransport.Address = "www.yourdomain.com"
oTransport.Password = "YourUserID"
oTransport.User = "YourPassword"

Set oTransport = oTransports.CreateTransport
oTransport.SetSMTP ' email
oTransport.Address = "user@domainname.com"
oTransport.DisplayName = "First Last Name"
oTransport.Message = "Test Send EDI file"
oTransport.Subject = "EDI file"

'Sends EDI file by FTP and SMTP
oTransports.Send

 

Samples