L
laiyongjun
Unregistered / Unconfirmed
GUEST, unregistred user!
BookMark_Name := 'tp'; //插入图片的位置
if WordDocument1.BookMarks.Exists(BookMark_Name) then
begin
WordDocument1.BookMarks.Item(BookMark_Name).Select;
FPicture := WordApplication1.Selection.InlineShapes.AddPicture('c:/1.bmp', EmptyParam, EmptyParam, EmptyParam);
FPicture.ConvertToShape.Select; //转成可移动模式...
WordApplication1.Selection.ShapeRange.WrapFormat.type_ := wdWrapTopBottom; //嵌入型
WordApplication1.Selection.ShapeRange.Left := wdShapeCenter;
end;
========================
以上是我的代码,我本以为:
WordApplication1.Selection.ShapeRange.Left := wdShapeCenter;
能够实现图片的水平居中,但是不行?
if WordDocument1.BookMarks.Exists(BookMark_Name) then
begin
WordDocument1.BookMarks.Item(BookMark_Name).Select;
FPicture := WordApplication1.Selection.InlineShapes.AddPicture('c:/1.bmp', EmptyParam, EmptyParam, EmptyParam);
FPicture.ConvertToShape.Select; //转成可移动模式...
WordApplication1.Selection.ShapeRange.WrapFormat.type_ := wdWrapTopBottom; //嵌入型
WordApplication1.Selection.ShapeRange.Left := wdShapeCenter;
end;
========================
以上是我的代码,我本以为:
WordApplication1.Selection.ShapeRange.Left := wdShapeCenter;
能够实现图片的水平居中,但是不行?