Add_ReferencedFile
Methode (Function) · gibt Boolean zurück
Add_ReferencedFile ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.
Beschreibung (aus der SDK-Dokumentation): Embeds a file from disk (Base64) as an additional referenced document of a line item (ram:AdditionalReferencedDocument in the line trade agreement). Only ReferencedFileType LineItem_AdditionalReferencedDocument is currently stored. Always sets the profile to Extended.
Rückgabe: Always False in the current implementation; check LastError (e.g. "FilePath does not exist", "File is empty") to detect problems.
Hinweis: The issue date stored with the attachment is taken from the Document_Date property.
Deklaration
Public Function Add_ReferencedFile(ByVal ReferencedFileType As iXML.WhichReferencedFile, ByVal PositionNO As Long, ByVal FilePath As String, ByVal IssuerAssignedID As String, ByVal URIID As String, ByVal LineID As String, ByVal TypeCode As String, Optional ByVal Name As String = "", Optional ByVal ReferenceTypeCode As String = "", Optional ByVal IssueDateTime As String = "", Optional ByVal Document_DateFormat As String = "", Optional ByVal MimeType As String = "") As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
ReferencedFileType | iXML.WhichReferencedFile | erforderlich | Target of the referenced file; currently only LineItem_AdditionalReferencedDocument is processed |
PositionNO | Long | erforderlich | Zero-based index of the line item |
FilePath | String | erforderlich | Full path of the file to embed (must contain a backslash and exist) |
IssuerAssignedID | String | erforderlich | Identifier of the referenced document |
URIID | String | erforderlich | External document location |
LineID | String | erforderlich | Referenced line ID |
TypeCode | String | erforderlich | Document type code; defaults to 916 if empty |
Name | String | optional (Standard: "") | Description of the document; defaults to the file name without extension |
ReferenceTypeCode | String | optional (Standard: "") | Reference type code / scheme identifier |
IssueDateTime | String | optional (Standard: "") | Document date, e.g. YYYYMMDD; if empty, the date format is set to 102 |
Document_DateFormat | String | optional (Standard: "") | Date format code, e.g. 102 |
MimeType | String | optional (Standard: "") | MIME type of the file; looked up from the Windows registry by file extension if empty |
Aufruf (VB.NET)
Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, LicenseKey)
' …
Dim ergebnis = alo.Add_ReferencedFile(ReferencedFileType, PositionNO, FilePath, IssuerAssignedID, URIID, LineID, TypeCode)
Artikel mit Add_ReferencedFile
COM-Schnittstelle
Add_ReferencedFile ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 170 von 328) und damit auch aus VB6, VBA/Access und anderen COM-Clients über CreateObject("Aloaha_ZUGFeRD.XML") aufrufbar. Neue Mitglieder werden immer am Ende von iXML angefügt, damit bestehende COM-Clients unverändert weiterlaufen; nach einem Update die Typbibliothek neu registrieren.