Related Topics
Pearls on a String:Further Extending Health (and Retirement) Savings Accounts
Pearls on a String: Further Extending Health (and Retirement) Savings Accounts.
HSAs are the string. Retirement saving, Privatizing Medicare, and Shifting Childhood Costs-- are the Pearls. Other Pearls to follow.
(Blog 2300) We have a facility on this website to download books of many chapters (made up of volumes of topics on the site) to Microsoft Word for subsequent editing and eventual publishing. In many cases we download lots of pictures (via an img src= tag). I have not found a way to set the way text flows around the images in Word using HTML or CSS, so I built a Word macro to do it. This should allow you to change the size of images, as well as move them around. Moving the captions requires the use of the captions feature in Word's image menu (right-click).
------------------------------------
Instructions for use of a Macro named Sub ImageFlow():
Sub ImageFlow()to
End Sub
If you want to do a lot of these manipulations, save the macro in the Macro Library of Windows Word.
------------------------------------ Sub ImageFlow() ' ' this Macro goes through an entire Word document and ' changes the way text flows around each picture ' ("Tight" in this example but see below for choices) ' Dim shpIn As InlineShape, shp As Shape For Each shpIn In ActiveDocument.InlineShapes If (shpIn.Type = wdInlineShapeLinkedPicture) Then Set shp = shpIn.ConvertToShape shp.WrapFormat.Type = wdWrapTight End If Next shpIn For Each shp In ActiveDocument.Shapes shp.WrapFormat.Type = wdWrapTight Next shp End Sub ---------------------------------------- Change wdWrapTight to any of the following: wdWrapBehind wdWrapFront wdWrapInline wdWrapNone wdWrapSquare wdWrapThrough wdWrapTight wdWrapTopBottom
My thanks to https://www.phrebh.com/Jenius/252-center-pictures-in-word-with-vba/ for showing me the essential technique of iterating through the pictures.
What are the InlineShapes' Types? See https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.inlineshape.type(v=office.11).aspx; it is possible we may also need to select on wdInlineShapePicture (as well as wdInlineShapeLinkedPicture) but for my specific purpose I did not need to.
Originally published: Sunday, July 08, 2012; most-recently modified: Wednesday, May 22, 2019