![]() |
|
|
|
#1
|
||||
|
||||
|
See, for example: https://www.msofficeforums.com/word-...html#post47919
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Quote:
![]() (Keep It Simple Not Sophisticated !) |
|
#3
|
|||
|
|||
|
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
|
|
#4
|
||||
|
||||
|
Hardly. The use of selections instead of range objects is particularly inefficient and generates screen flicker. Furthermore, the whole point of using a table as my code does is so that you can ensure the image and its text can be assured of moving together.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Placing Endnotes in the Middle of a Document | lrosebush | Word | 3 | 10-24-2016 04:05 PM |
VBA to split word document containing pictures using delimter
|
uday.word | Word VBA | 5 | 09-11-2016 05:59 AM |
| Formula for Placing Text in A Worksheet Group? | Margaret | Excel | 4 | 07-17-2016 11:54 PM |
Creating a (shared!) file with CommandButton placing AutoText into the document
|
thmsrox | Word VBA | 5 | 07-07-2016 05:04 AM |
Placing Image behind Text Box
|
alexei_lg | Word | 1 | 02-07-2012 12:28 PM |