RESIZE PICTURE

K

Kernal

I use this line of code to insert my picture in a table in
a WORD doc:

ThisDocument.AttachedTemplate.AutoTextEntries
("autotext").Insert where:=ActiveDocument.Bookmarks
("bookmarkname").Range

I want to then set/resize the picture to fit the cell, so
when inserted it does not expand my table all out of
whack. Of course, you can select fixed column width, but
not height.
I've tried code to set the height and width to no avail.
I'm close but must have it still wrong.
WORD 2000
 
M

Mark Tangard

Of course, you can select fixed column width, but
not height.

Yes you can. It's squirreled away real good in Word 2000
and later, but it's still there. And if you're using VBA
you don't need the dialogs anyway. What you're omitting
is setting the "Height Rule" first, then the height.

This'll keep all rows a half-inch high:

Dim t As Table
Set t = ActiveDocument.Tables(1)
t.Rows.HeightRule = wdRowHeightExactly
t.Rows.Height = 36

You can set it for individual rows, or for the whole table
as shown above.

A similar two-part procedure applies to linespacing.

--
Mark Tangard <[email protected]>, Microsoft Word MVP
Please reply only to the newsgroup, not by private mail.
Note well: MVPs do not work for Microsoft.
"Life is nothing if you're not obsessed." --John Waters
 

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