Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-07-2024, 04:16 AM
Italophile Italophile is online now Modifying Macropod's Macro (Insert Multiple Images with Caption) Windows 11 Modifying Macropod's Macro (Insert Multiple Images with Caption) Office 2021
Expert
 
Join Date: Mar 2022
Posts: 564
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by stevenjohnson View Post
1) The caption cells will always have a shading of "White, Background 1, Darker 25%"
In the FormatRows routine add the following to the "With .Rows(x + 1)" block

Code:
.Cells.Shading.BackgroundPatternColor = -603930625
Quote:
Originally Posted by stevenjohnson View Post
2) The caption template will always be:
Figure (numeric value)
Comment:
Comment out the line that adds the Picture caption label:
Code:
CaptionLabels.Add Name:="Picture"
Change the line that inserts the caption to use the Figure label
Code:
.Characters.First.InsertCaption _
          Label:="Figure", Title:=StrTxt, _
Edit the lines that set StrTxt to contain the additional text that you require.

Quote:
Originally Posted by stevenjohnson View Post

3) The caption font will always be Black, Times New Roman, Font 12
4) The caption [paragraph] will have 0 pt for before and after spacing and single line spacing
Simply modify the Caption style in the template you use for this document.

Quote:
Originally Posted by stevenjohnson View Post
5) The macro table (the image and its caption) will always be horizontally centered to the entire page. Vertically centered would be a bonus but my work documents have header/footer information which I currently do not have the dimensions to right now.
Add the following in the With oTbl block just before the End With

Code:
      .Rows.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
      .Rows.HorizontalPosition = wdTableCenter
      .Rows.RelativeVerticalPosition = wdRelativeVerticalPositionPage
      .Rows.VerticalPosition = wdTableCenter
Quote:
Originally Posted by stevenjohnson View Post
For caption 2, I was able to extend the height of the caption so that the words don't get cut off when I write a full sentence, but I cannot extend the height of the caption for caption 1 (due to inserted photo constraints?). I would like the height of the caption to be like caption 2 and not caption 1.
Just select the row and set the height on the Table Layout tab. This will also give you the value to set the height to in the FormatRows routine.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying Macropod's Macro (Insert Multiple Images with Caption) Macro to insert multiple images into a table with defined number of rows and columns Davidl88 Word VBA 6 09-05-2022 03:41 PM
Modifying Macropod's Macro (Insert Multiple Images with Caption) Need Help modifying code for inserting multiple images atifsyed Word VBA 8 05-17-2022 07:31 PM
Modifying Macropod's Macro (Insert Multiple Images with Caption) Macro to insert multiple images into a table Penini Word VBA 1 03-23-2022 02:30 PM
Insert multiple images at once from a folder beyondimage Excel 1 02-01-2017 12:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:54 PM.


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