Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 04-22-2014, 11:09 PM
macropod's Avatar
macropod macropod is offline Macro to add captions to pictures inside word document Windows 7 32bit Macro to add captions to pictures inside word document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
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
 

Tags
automatic figure caption



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to add captions to pictures inside word document VBA to insert captions without appending to existing captions Marrick13 Word VBA 17 03-21-2023 07:51 PM
Macro to add captions to pictures inside word document Help formatting Pictures inside a Text Box in Word 2013 jstumbo87 Word 2 01-29-2014 12:07 PM
Macro to add captions to pictures inside word document Macro to read word document harishankar.selvaraju Excel Programming 1 06-14-2012 03:48 AM
Where we can find a Word document (docx file) that contains professional work inside? Jamal NUMAN Word 0 06-26-2011 09:57 AM
Captions and Figures Inside a Frame...RIDICULOUS MS hasn't developed a solution!!! stlsmiln Word 2 02-23-2010 02:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft