//保存文档
with SaveDialog1 do
begin
SaveDialog1.FileName := ObjectFileName;
if (Length(FileName) = 0) or (Sender = SaveAs1) then
begin
if Execute then
begin
OleContainer1.SaveToFile(FileName);
ObjectFileName := FileName;
end
end
else
OleContainer1.SaveToFile(FileName);
end;