Programming Text and Picture into header into a Word Document
I'm writing to a Word Document and I want to add a picture and text to the header. I can add the picture with the first line of code, but when I add the second line of code, it writes over the picture and the picture disappears. I would like to insert the picture in the header on the left and the text in the header aligned to the right. Any help would be appreciated.
Thanks,
Code:
objDoc.Sections(1).Headers(WdHeaderFooterIndex.wdHeaderFooterPrimary).Shapes.AddPicture(FileName, True, True)
objDoc.Sections(1).Headers(WdHeaderFooterIndex.wdHeaderFooterPrimary).Range.Text = "Header Text"
objApp.Selection.Paragraphs.Alignment = 2
Re: Programming Text and Picture into header into a Word Document
set the wrapformat of the shape, to allow text to wrap appropriately
check help or online to find the constants used
Re: Programming Text and Picture into header into a Word Document
westconn1. I tried that, but I dont want to add 50+ shapes. I want to add multiple items in the header.