Hi,
I've got a simple macro for Word that adds a caption figure & number to all the images in a file. This is usually a photo appendix for reports for me.
I would like to host this a separate ideally excel (or word) file that I have other useful macros rather than the file with all the pictures, however I'm not sure what I need to do at the start of the code, presumably at the ActiveDocument line.
Can anyone help?
I've got a simple macro for Word that adds a caption figure & number to all the images in a file. This is usually a photo appendix for reports for me.
I would like to host this a separate ideally excel (or word) file that I have other useful macros rather than the file with all the pictures, however I'm not sure what I need to do at the start of the code, presumably at the ActiveDocument line.
Can anyone help?
VBA Code:
Sub CaptionPictures()
Dim xPic As InlineShape
For Each xPic In ActiveDocument.InlineShapes
xPic.Select
Selection.InsertCaption "Figure", "", "", wdCaptionPositionBelow, 0
With ActiveDocument.Styles("Caption").Font
.Name = "Century Gothic"
.Size = 8
.ColorIndex = wdautomatic
.Italic = True
End With
Next
End Sub