Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Bluebird73 Bluebird73 is offline
Banned
 
Posts: 0
Talking Wishing to add "filenames" underneath the thumbnail photos

Hi all,

I was actually following a Word Learning Group via Email subscription back in 1997. I wonder if this forum is exactly that one. 21 years passed, and I've totally lost contact with that great group. I found Graham Mayor in the MVP and a guru in this forum. I remember he was leading the group back in 1997.

Today I need to create a word table of 3 columns and batch import my 50 photos into each cell and make each thrumbnail picture the same size. I also need to put the filenames of the photos right underneath each thumbnail. I googled and found a thread on this site that can do half the task - without being able to put the filename.

I am pasting the macro below. Hopefully, some kind friends could help me out.

Thank you so much.

----------------
Sub InsertMultipleImages()
Dim fd As FileDialog
Dim oTable As Table
Dim sNoDoc As String
Dim vrtSelectedItem As Variant
If Documents.Count = 0 Then
sNoDoc = MsgBox(" " & _
"No document open!" & vbCr & vbCr & _
"Do you wish to create a new document to hold the images?", _
vbYesNo, "Insert Images")
If sNoDoc = vbYes Then
Documents.Add
Else
Exit Sub
End If
End If
'add a 1 row 3 column table to take the images
Set oTable = Selection.Tables.Add(Selection.Range, 1, 3)
oTable.AutoFitBehavior (wdAutoFitFixed)
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.Title = "Select image files and click OK"
.Filters.Add "Images", "*.gif; *.jpg; *.jpeg; *.bmp; *.tif; *.png"
.FilterIndex = 2
If .Show = -1 Then
oTable.Cell(1, 1).Select
For Each vrtSelectedItem In .SelectedItems
With Selection
.InlineShapes.AddPicture FileName:= _
vrtSelectedItem _
, LinkToFile:=False, SaveWithDocument:=True, _
Range:=Selection.Range
.MoveRight Unit:=wdCell
End With
Next vrtSelectedItem
Else
End If
End With
If Len(oTable.Rows.Last.Cells(1).Range) = 2 Then
oTable.Rows.Last.Delete
End If
Set fd = Nothing
End Sub
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"how to format the picture size of several photos simultaneously" Marcos Melendez Microsoft Word Help 1 September 28th 07 05:54 AM
I can't find the symbol "s" with a dot underneath Tom Microsoft Word Help 2 July 9th 07 03:59 PM
Need template for "New Employee" bulletin/listing with photos Sorcerer Mickey Microsoft Word Help 2 April 6th 06 06:40 AM
"Template for digital photos and captions" Mike Servat Page Layout 1 December 30th 05 05:37 PM
How to "auto merge" 50 photos into 50 Word pages? focusmankc Microsoft Word Help 1 December 30th 05 07:49 AM


All times are GMT +1. The time now is 04:35 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"