function ObjidToExcel(Objid: String): Boolean; var Excel: Variant; ExcelSheet: Variant; q: TQuery; i, Row: Integer; begin Result:=False; //Excel verbinden Excel:=GetActiveOleObject('Excel.Application'); ExcelSheet:=Excel.ActiveSheet; //OBJID schreiben // wenn ein Kommentar vorhanden dann //Excel.ActiveCell.Comment.delete; // ansonsten Excel.ActiveCell.AddComment(Objid + ' '+ chr(10)+'... wenn DU das lesen kannst hat es geklappt'); Excel.ActiveCell.Comment.Shape.Width:=260; Excel.ActiveCell.Comment.Shape.Height:=30; Excel.Visible:=True; ExcelSheet:=Null; Excel:=Null; Result:=True; end; begin ObjidToExcel('<@Objekt.Objid>'); end.