View Single Post
 
Old 11-02-2017, 01:29 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,138
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Without knowing how the images are inserted it is something of a guess, but the following will insert the date in the required format after each image.

Code:
Sub Macro1()
'Graham Mayor - http://www.gmayor.com - Last updated - 02 Nov 2017
Dim iShp As Integer
Dim dStartDate As Date
Dim oRng As Range
Dim strDate As String
    dStartDate = "01/01/2018"
    For iShp = 1 To ActiveDocument.InlineShapes.Count
        strDate = Format((dStartDate + iShp), "mmmm d") & _
                DateOrdinal(Format((dStartDate + iShp), "d")) & _
                Format((dStartDate + iShp), " yyyy")
        Set oRng = ActiveDocument.InlineShapes(iShp).Range
        oRng.Collapse 0
        oRng.Text = vbCr & strDate & vbCr
        Set oRng = oRng.Paragraphs(2).Range
        oRng.Font.Size = 24
        oRng.ParagraphFormat.Alignment = wdAlignParagraphCenter
    Next iShp
lbl_Exit:
    Set oRng = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote