Inserting Picture into a Table

B

Brian

I am setting up a macro to insert a picture(JPG) into a cell
of a table. If the pic is too big for the cell, the cell
expands to accomodate the size. I want the picture to fit
exactly in the cell. There must be some way to either prevent
the cell from resizing or to specify the size of the picture
during the insert. I'm using InlineShapes.AddPicture.

Any help is greatly appreciated!
Brian
 
H

Helmut Weber

Hi Brian,

these properties of a table might help you.
Selection.Tables(1).Columns(1).PreferredWidthType
=wdPreferredWidthPoints
Selection.Tables(1).Columns(1).PreferredWidth =
CentimetersToPoints(2)
plus the according formatting for the cell-paragraph,
like
With Selection.ParagraphFormat
.LeftIndent = CentimetersToPoints(0)
.RightIndent = CentimetersToPoints(0)
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 0
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle '!
etc...

Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word XP, NT 4.0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top