If there is a table in each footer of each section then the following will put a selected image into the first row second cell of that table and the image will shrink to the width of the cell.
Code:
Sub Logo()
Dim fDialog As FileDialog
Dim strLogo As String
Dim oTable As Table
Dim oCell As Range
Dim oSection As Section
Dim oFooter As HeaderFooter
Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
With fDialog
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Graphics Files", "*.jpg,*.png,*.tif, *.bmp, *.gif"
.InitialFileName = Environ("USERPROFILE") & "\Pictures\"
.InitialView = msoFileDialogViewList
If Not .Show = -1 Then
MsgBox "User cancelled"
GoTo lbl_Exit
End If
End With
strLogo = fDialog.SelectedItems(1)
For Each oSection In ActiveDocument.Sections
For Each oFooter In oSection.Footers
If oFooter.Exists Then
If oFooter.Range.Tables.Count > 0 Then
Set oTable = oFooter.Range.Tables(1)
If oTable.Rows(1).Cells.Count > 1 Then
oTable.AutoFitBehavior wdAutoFitFixed
Set oCell = oTable.Cell(1, 2).Range
oCell.End = oCell.End - 1
oCell.Text = ""
oCell.InlineShapes.AddPicture strLogo
End If
End If
End If
Next oFooter
Next oSection
lbl_Exit:
Set oSection = Nothing
Set oFooter = Nothing
Set oTable = Nothing
Set oCell = Nothing
Exit Sub
End Sub