![]() |
|
#9
|
||||
|
||||
|
You can't wrap text around an inline shape - it needs to be a floating shape. So you need to convert it to a shape if you want the text wrap setting. Shapes are not bothered with paragraph alignment so that probably won't be needed unless you are also putting text in the header.
Code:
Sub AddImageToHeader()
Dim SrcePath As String, headerPic As InlineShape, aShp As Shape
SrcePath = "S:\DocBase\Document Templates\Macros\New Macros Nov 2018\Letterhead.jpg"
Set headerPic = ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.InlineShapes.AddPicture(SrcePath)
Set aShp = headerPic.ConvertToShape
With aShp
.LockAspectRatio = msoTrue
.Width = CentimetersToPoints(21)
.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
.RelativeVerticalPosition = wdRelativeVerticalPositionPage
.Top = 0
.Left = 0
.WrapFormat.Type = wdWrapBehind
End With
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Header and Footer | Diablodvs7 | Word | 1 | 07-28-2015 07:54 PM |
| Header and footer aligned in the footer area | ashiqghfr | Word | 2 | 07-23-2015 01:14 AM |
header footer
|
Pierre-Hugues | Word VBA | 1 | 08-30-2013 06:06 AM |
| How to resize the image in the header so that it fits the page | Isadora | Excel | 1 | 08-20-2013 06:02 AM |
| Relocate footnotes to facing page | Wydeye | Word | 0 | 02-23-2010 05:48 PM |