Inserting a logo to the header and...

L

Leila

I want to insert a logo to the header of a document which
has an inserted number as a footer(by another macro). When
I run the below code the footer gets deleted and the logo
gets inserted to the header. What I want is to keep them
both, any suggestion? Thanks,

Sub InsertALogo()

With ActiveDocument.PageSetup
.DifferentFirstPageHeaderFooter = True
End With

With ActiveDocument.Sections.First.Headers
(wdHeaderFooterFirstPage).Range
.InsertFile FileName:="C:\Logo.doc", _
ConfirmConversions:=False, _
Range:="", _
Link:=False, _
Attachment:=False
End With

End Sub
 
C

Charles Kenyon

I suspect that your first macro inserts into the "footer" rather than the
firstpagefooter. Your number got bumped to your continuation pages. Try
manually inserting a page break in a document produced with your code and
see.
 
L

Leila

Yes, the other macro inserts the number to the footer (all
pages) and this one should insert the logo only to the
header of the first page. But it deletes the footer of the
first page as well which I don't want to do that, any idea?
Thanks,
Leila
 
C

Charles Kenyon

Go back and read my message. Your footer is still there.

The setting for different first page applies to both header and footer.

You could, in your first macro, insert what you want in both the footer and
the firstpagefooter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top