Подскажите, пожалуйста, как в рамках одной процедуры записать одной строкой выполение другой процедуры, механически не включая команд этой процедуры.
Например, после команды
Код:
1 | MSWord . ActiveDocument . tables . item( 1 ).cell(c, 8 ).range . delete;
|
процедуры
Код:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | procedure TForm1 . Timer3Timer(Sender: TObject);
begin
c:= c+ 1 ;
r:=table1 . Rows . Count;
if ((c < r) or (c = r)) then
begin
MSWord . ActiveDocument . tables . item( 1 ).cell(c, 2 ).range . delete;
MSWord . ActiveDocument . tables . item( 1 ).cell(c, 3 ).range . delete;
MSWord . ActiveDocument . tables . item( 1 ).cell(c, 4 ).range . delete;
MSWord . ActiveDocument . tables . item( 1 ).cell(c, 5 ).range . delete;
MSWord . ActiveDocument . tables . item( 1 ).cell(c, 6 ).range . delete;
MSWord . ActiveDocument . tables . item( 1 ).cell(c, 7 ).range . delete;
MSWord . ActiveDocument . tables . item( 1 ).cell(c, 8 ).range . delete;
end
else
Timer3 . Enabled := False ;
end ;
|
вставить выполнение одной строкой процедуры
Код:
1 2 3 4 5 6 7 8 | procedure TForm1 . Edit1DblClick(Sender: TObject);
begin
n:= 0 ;
Form1 . Image1 . Picture . LoadFromFile(OpenPictureDialog1 . FileName);
ComboBox2 . Text := ' ' ;
ComboBox3 . Text := ' ' ;
ComboBox4 . Text := ' ' ;
end ;
|
Если это можно сделать в принципе.
Спасибо!