Indicates what type of document a given file is formatted in.
Syntax:
Parameters:
Returns
Returns one of the document types specified in the Document Type Constants.
Remarks
For information on how FREDI determines a document type, please see the Remarks section under the following topic:
- For information on how an ASC/X12 is quickly determined, see ediFile.IsAscX12.
- For information on how a UN/EDIFACT is quickly determined, see ediFile.IsUnEdifact.
- For information on how an XML file is quickly determined, see ediFile.IsXml.
- For information on how an Internet Mail file is quickly determined, see ediFile.IsInternetMail.
Example
Dim oEdiDoc As Fredi.ediDocument
Dim oFileSystem As Fredi.ediFileSystem
Dim oFile As Fredi.ediFile
Dim eFileType As Fredi.DocumentTypeConstants
' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument
' Get file system object.
Set oFileSystem = oEdiDoc.GetFileSystem
' Determine document type.
eFileType = oFileSystem.GetDocumentType(sFileName)
If eFileType = DocumentType_AscX12 Then
MsgBox "File is ASC/X12 document"ElseIf eFileType = DocumentType_UnEdifact Then
MsgBox "File is UN/EDIFACT document"ElseIf eFileType = DocumentType_Xml Then
MsgBox "File is XML document"ElseIf eFileType = DocumentType_InternetMail Then
MsgBox "File is Internet Mail document"Else
MsgBox "File is some other document"End If
Samples