Board index » delphi » Curious Word Picture into Table.Cell issue
Dave M.
![]() Delphi Developer |
Curious Word Picture into Table.Cell issue2003-07-29 11:49:40 PM delphi178 Dear all, I have a curious issue/bugette - I wonder if anyone has ever came across it or something like this before? Basically, I am inserting a picture into a table.cell, using: procedure TWordAPI.InsertPictureIntoCell(fileName: String; tbl: OleVariant; column: Integer; row: Integer); var varFalse, varTrue: OleVariant; OleRange: OleVariant; begin; try varTrue := True; varFalse := False; OleRange := Tbl.Cell(column, row).Range; Tbl.Cell(column, row).Range.InlineShapes.AddPicture(filename, False, True, OleRange); except on e: exception do HandleException('InsertPicture', e ); end; end; which works fine. However, the cell in which I insert the picture (which is small) does *not* resize to accommodate the picture - instead most of the picture is hidden behind other cells in the table. Additionally even if I resize the cell in code to the size of the picture, the picture seems anchored to the top-left of the cell. The funny thing is that previously (before this afternoon), the cell *did* resize properly and everything was fine, but it suddenly stopped working and started displaying the behaviour above. Does anyone know why this is the case? Best, Dave |