![]() |
|
#4
|
||||
|
||||
|
You need to tell Word what to set the position relative to. Try something based on:
Code:
Sub ImageInHeaderFooter()
Application.ScreenUpdating = False
Dim Shp As Shape
With ActiveDocument.Sections(1)
Set Shp = .Headers(wdHeaderFooterPrimary).Shapes.AddPicture( _
FileName:="\\URL2Image.jpg", SaveWithDocument:=True)
With Shp
.LockAnchor = True
.LockAspectRatio = True
.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
.RelativeVerticalPosition = wdRelativeVerticalPositionPage
.Left = CentimetersToPoints(-0.5)
.Top = CentimetersToPoints(0.7)
.Width = CentimetersToPoints(8.2)
End With
Set Shp = .Footers(wdHeaderFooterPrimary).Shapes.AddPicture( _
FileName:="\\URL2Image.jpg", SaveWithDocument:=True)
With Shp
.LockAnchor = True
.LockAspectRatio = True
.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
.RelativeVerticalPosition = wdRelativeVerticalPositionPage
.Left = CentimetersToPoints(-2.8)
.Top = CentimetersToPoints(25.6)
.Width = CentimetersToPoints(21.8)
End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hyperlinks defaulting to absolute instead of relative!!! | wdzambotti | Word VBA | 1 | 08-17-2015 09:03 PM |
| Fix data output position relative to page | Al See | Mail Merge | 1 | 01-16-2014 04:13 PM |
Set "Page" as default Image Layout Position (HELP BEFORE I GO NUTS!)
|
cjt | Word | 6 | 05-26-2012 10:46 AM |
| Macro for absolute text box re-position | hobbsbaboo | PowerPoint | 0 | 03-15-2012 01:44 AM |
How To Get Image to be absolute center of slide
|
mjg060468 | PowerPoint | 3 | 08-09-2010 02:07 PM |