Insert the image into the cell of a table that has fixed cell dimensions.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
The fixed cell almost works for me, but the image is larger than what I would
like it to be. I've tried inserting a text frame and the includepicture
within that, but then I only get the same picture throughout the table, it
does not update to each "product" image. I've also tried inserting a frame
and then the code within it, but I can't seem to get the frame placed within
the cell.
Any more thoughts??
Diane
> Insert the image into the cell of a table that has fixed cell dimensions.
>
[quoted text clipped - 12 lines]
> > merged report that uses the "includepicture"??
> > Thanks, Diane
Doug Robbins - Word MVP - 08 Sep 2007 02:07 GMT
You can use code to adjust the size of the image inserted into the cell of a
table.
This is part of a routine that was set up to load various corporate logos
into a cell of a table in the header of a document, and then adjust the size
of the logo so that it fitted in the cell:
'Insert Logo on Title Page
myDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range.Delete
myDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range.InlineShapes.AddPicture Filename:=txtLargeLogoPath
'Adjust size of logo to match avalable space
oheight =
myDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range.InlineShapes(1).Height
owidth =
myDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range.InlineShapes(1).Width
If oheight < InchesToPoints(2) Then
With
myDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range.InlineShapes(1)
.Height = InchesToPoints(2)
.Width = owidth * InchesToPoints(2) / oheight
End With
End If
oheight =
myDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range.InlineShapes(1).Height
owidth =
myDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range.InlineShapes(1).Width
If owidth > InchesToPoints(2.85) Then
With
myDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range.InlineShapes(1)
.Width = InchesToPoints(2.85)
.Height = oheight * InchesToPoints(2.85) / owidth
End With
End If

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> The fixed cell almost works for me, but the image is larger than what I
> would
[quoted text clipped - 29 lines]
>> > merged report that uses the "includepicture"??
>> > Thanks, Diane