Ci-dessous une UNIt qui pourrait-ĂȘtre utile!
Robert Greborio
unit OpenOffice;
interface
procedure StartOffice;
Function PathToURL(s:String):String;
procedure WriteCell(MyDoc:Variant;CellPos,Text:ShortString);
procedure WriteFooter(MyDoc:Variant;Text:ShortString);
Function RunMacro:Variant;
implementation
Uses OOoTools,OpenOffConst;
procedure StartOffice;
Begin
ConnectOpenOffice;
End;
Function PathToURL(s:String):String;
Begin
Result:=ConvertToURL(s);
End;
procedure WriteCell(MyDoc:Variant;CellPos,Text:ShortString);
var
Sheets, Sheet, Cell: Variant;
begin
Sheets:= MyDoc.Sheets;
Sheet:= Sheets.getByIndex(0);
Cell:= Sheet.getCellRangeByName(CellPos);
Cell.String:=Text;
end;
procedure WriteFooter(MyDoc:Variant;Text:ShortString);
var
Sheets,Sheet,StyleFam,PageStyle,HCont,HText: Variant;
begin
Sheets:=MyDoc;
Sheet:=Sheets.CurrentController.getActiveSheet;
StyleFam:=
Sheets.StyleFamilies.getByName('PageStyles').getByName(Sheet.PageStyle);
StyleFam.FooterIsOn:=True;
StyleFam.FooterShared:=True;
HCont:=StyleFam.RightPageFooterContent;
HText:=HCont.CenterText;
HText.setString('[EMAIL PROTECTED] Report by GSE Sas');
StyleFam.RightPageFooterContent:=HCont;
end;
Function RunMacro:Variant;
Begin
Result:=CreateProperties(['MacroExecutionMode',_documentMacroExecModeALWAYS_EXECUTE_NO_WARN]);
End;
end.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]