View Single Post
 
Old 03-08-2020, 11:35 PM
SamDsouza SamDsouza is offline Windows 10 Office 2013
Advanced Beginner
 
Join Date: Aug 2019
Posts: 71
SamDsouza is on a distinguished road
Default

Thank you sir, I did put in right place but realised very late for the below syntax
Quote:
Const wdHeaderFooterPrimary As Long = 1
But now i get Error as User Type Not defined marked in bold below when implementing the same to insert the image
Code:
Dim oSec As Section
Dim oHeaderFooter As HeaderFooter
Dim oLogo As inlineshape
        
Set oSec =  ActiveDocument.Sections
        Set oHeaderFooter = oSec.Headers(wdHeaderFooterPrimary)
        With oHeaderFooter.Range
            .ParagraphFormat.Alignment = wdAlignParagraphRight
                   Set oLogo = .InlineShapes.AddPicture(Filename:="C:\FORMS\1-Seal.jpg", LinkToFile:=False, SaveWithDocument:=True)
        
        End With
        With oLogo
            .Height = 75
            .Width = 100
        End With
SamD
Reply With Quote