View Single Post
 
Old 06-22-2022, 11:33 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For example:
Code:
Sub LOGO1()
Application.ScreenUpdating = False
Dim Rng As Range, i As Long, Shp As Shape, ImageName As String
ImageName = "/Users/federicopannacci/Desktop/bcube_logo.png"
With ActiveDocument
  For i = 1 To .ComputeStatistics(wdStatisticPages)
    Set Rng = .Range.GoTo(What:=wdGoToPage, Name:=i)
    Set Shp = .Shapes.AddPicture(FileName:=ImageName, LinkToFile:=False, Anchor:=Rng, _
      Top:=CentimetersToPoints(25), Left:=CentimetersToPoints(6), Width:=95, Height:=45)
    With Shp
      .LockAspectRatio = True
      .WrapFormat.Type = wdWrapBehind
      .LockAnchor = True
      .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
      .RelativeVerticalPosition = wdRelativeVerticalPositionPage
    End With
    .Hyperlinks.Add Anchor:=Shp, SubAddress:="_top"
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote