Function EN Version 3.00

@RTAddFileIcon

RichText Text

Syntax

@RTAddFileIcon(TEXT1;TEXT2;TEXT3;RT4);

Description

Appends a file icon in OS/2 style to the RichText field RT RT4.

TEXT1:
Name of the file attachment used for display and for reference within the Notes document. This name must be unique.

TEXT2:
Original name of the file attachment. This name does not have to be unique.

TEXT3:
Icon text used only for display; it is shown next to the file icon in the RT field.

Example: @RTAddFileIcon(TEXT1;TEXT2;TEXT3;RT4);

ID:=8838;

dbh1:=@OpenDb("TEST.NSF");
noteh1:=@OpenNoteByID(dbh1;ID;noteh1);

names:=@Attachmentnames(noteh1);
orgnames:=@AttachmentInfo(noteh1;"FN");

noteh2:=@CreateNote(dbh1;noteh2);
Form[noteh2]:=Form[noteh1];

Ret:=@CopyAttachment(dbh1;dbh1;noteh1;noteh2;names);

STYLE1:=0:1:10:0:9;
STYLE2:=0:1:10:0:8;
RT[noteh2]:=@RTInit;
RT[noteh2]:=@RTAddText("File List Start"+@Newline;STYLE1;RT[noteh2]);
n2:=1;
n2e:=@elements(names);
while(n2<=n2e)
{
   TEXT1:=@GetListElement(names;n2);
   TEXT2:=@GetListElement(orgnames;n2);
   RT[noteh2]:=@RTAddText(" File "+TEXT1+" -> ";STYLE2;RT[noteh2]);
   RT[noteh2]:=@RTAddFileIcon(TEXT1;TEXT2;"AnzeigeText:"+TEXT2;RT[noteh2]);
   RT[noteh2]:=@RTAddText(" <- "+@Newline;STYLE2;RT[noteh2]);
   @Increment(n2);
}
RT[noteh2]:=@RTAddText("File List End"+@Newline;STYLE1;RT[noteh2]);

noteh2:=@CloseNote(noteh2;1);
noteh1:=@CloseNote(noteh1;0);

dbh1:=@CloseDb(dbh1);

The document with NoteID 8838 (this is only an example value) is opened in the database named "TEST.NSF".
A new document is then created in this database, and the file attachments from the first document are copied to the new document.
The form of the new document is also taken from the first document.
In the RT field of the new document, a list of the attached files is created, with the file icons also integrated as references.

Note : This text was machine-translated and may contain inaccuracies.