View Single Post
 
Old 04-22-2014, 11:09 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Benble View Post
I wonder if it is simple to change this AddCaptionText or the AddImageCaptionTables function to have the text above the image (in row 1 instead of having the caption the after the image).
To have the caption row appear above the image, instead of below, edit the MakeImageTable macro. Change the: Rows(1) references to Rows(2); Cell(1, 1) references to Cell(2, 1); and Cell(2, 1) references to Cell(1, 1). Similarly, with the AddCaptionText macro, change Tbl.Range.Cells.Count to 1.

Quote:
Originally Posted by Benble View Post
What is the code to expand the table so the text in the table is not written in several lines (unless it is so large the it does not fit on one row on the whole page).
As coded, the table widths are the same as the picture widths. The intention behind that is to allow for text wrapping around the pictures and their captions. The code line that gets the picture width is:
PicWdth = .InlineShapes(i).Width
and the code line that applies it is:
.Columns.Width = PicWdth
Without the second of the above lines, the table widths will fill the margins. A compromise might be to set a minimum width for PicWdth, via either of:
If PicWdth < CentimetersToPoints(8.9) Then PicWdth = CentimetersToPoints(8.9)
or:
If PicWdth < InchesToPoints(3.5) Then PicWdth = InchesToPoints(3.5)
immediately after the PicWdth = .InlineShapes(i).Width lines. You could, of course, change the units indicated to something else.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote