Z
ZengMuAnSha
Unregistered / Unconfirmed
GUEST, unregistred user!
假设使用DELPHI向个已有页头和页脚的DOC,插入图型。
在网上查了些零碎的资料,对下面的技术熟悉些。对DELPHI控件版面上的SERVERS DOC控件不熟悉!
procedure TForm1.Button2Click(Sender: TObject);
var
vWordApp:OleVariant;
vAppPath: String;
begin
vAppPath :=ExtractFilePath(ParamStr(0));
vWordApp := CreateOleObject('Word.Applcation');
try
vWordApp.Visible := True;
vWordApp.Documents.Open('C:/BB.Doc');
vWordApp.ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Text :='Tmd';
vWordApp.ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text :='Tmd';
//vWordApp.ActiveDocument.Frames.Item.Add;
//vWordApp.ActiveDocument.Frames.Item(1).Select;
// vWordApp.Selection.InlineShapes.AddPicture('C:/1.Bmp');
vWordApp.Documents.close;
finally
vWordApp:= unassigned;
end;
end;
在网上查了些零碎的资料,对下面的技术熟悉些。对DELPHI控件版面上的SERVERS DOC控件不熟悉!
procedure TForm1.Button2Click(Sender: TObject);
var
vWordApp:OleVariant;
vAppPath: String;
begin
vAppPath :=ExtractFilePath(ParamStr(0));
vWordApp := CreateOleObject('Word.Applcation');
try
vWordApp.Visible := True;
vWordApp.Documents.Open('C:/BB.Doc');
vWordApp.ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Text :='Tmd';
vWordApp.ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text :='Tmd';
//vWordApp.ActiveDocument.Frames.Item.Add;
//vWordApp.ActiveDocument.Frames.Item(1).Select;
// vWordApp.Selection.InlineShapes.AddPicture('C:/1.Bmp');
vWordApp.Documents.close;
finally
vWordApp:= unassigned;
end;
end;