View Single Post
 
Old 02-02-2018, 12:00 PM
ksor ksor is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Feb 2018
Location: Århus V, Denmark
Posts: 74
ksor is on a distinguished road
Default

I think this is "best practice" inserted centered and one by one with text bolow each of them - simple and minimized:

Code:
Public Sub imageInsert(imgPath As String, txt As String, bD As Word.Document)
    Dim ksSel As Selection
    Set ksSel = Word.Application.Selection
    With ksSel
        .EndKey Unit:=wdStory
        .InlineShapes.AddPicture fileName:=imgPath, LinkToFile:=False, SaveWithDocument:=True
        .MoveRight Unit:=wdCharacter, Count:=1
        .TypeParagraph
        .TypeText Text:=txt
        .TypeParagraph
        .MoveUp Unit:=wdLine, Count:=2, Extend:=wdExtend
        .ParagraphFormat.Alignment = wdAlignParagraphCenter
        .EndKey Unit:=wdStory
    End With
    Set ksSel = Nothing
End Sub
Reply With Quote