This is crude but should get you started.
But to really get started, you have to write some code.Sub InsertImages() Dim lngCount As Long, oTbl As Table, oCell As Cell Dim oRng As Range, oILS As InlineShape Dim strFolder As String, strFile As String Application.ScreenUpdating = False strFolder = GetFolder If strFolder = "" Then Exit Sub Set oTbl = ActiveDocument.Tables(1) oTbl.AutoFitBehavior (wdAutoFitFixed) strFile = Dir(strFolder & "\*.*", vbNormal) While strFile <> "" If InStr(strFile, "jpg") > 0 Or InStr(strFile, "png") > 0 Then 'To filter only jpg and png graphic files lngCount = lngCount + 1 If lngCount > oTbl.Rows.Count - 1 Then oTbl.Rows.Add Set oCell = oTbl.Cell(lngCount + 1, 3) Set oRng = oCell.Range oRng.Collapse wdCollapseStart Set oILS = oRng.InlineShapes.AddPicture(FileName:=strFolder & Application.PathSeparator & strFile, _ LinkToFile:=False, SaveWithDocument:=True) With oILS 'Manipulate to suit End With End If strFile = Dir() Wend Application.ScreenUpdating = True lbl_Exit: Exit Sub End Sub Function GetFolder() As String Dim oFolder As Object GetFolder = "" Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0) If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path Set oFolder = Nothing End Function
Sub Help()
Msgbox "What do I next"
End Sub
Is better than nothing ;-)




Reply With Quote