D
drichird
'multipage document has a different firstpage header and standard headers
'on rest of the pages (different first header). I need to select header
'for rest of pages (not the different, first page header)
'but every change I make seems to affect firstpage header only
'go to the "first page" header
ActiveWindow.ActivePane.View.SeekView = wdSeekFirstPageHeader
'insert a picture into the shapes of the "first page" header
Selection.HeaderFooter.Shapes.AddPicture _
(FileName:="C:\first.bmp", _
LinkToFile:=False, SaveWithDocument:=True).Select
'give the "first page" header picture a name
Selection.ShapeRange.Name = "firstpage"
'goto 2nd page, the 2nd type of header for all other pages
'starts on the second page
ActiveDocument.Range.GoTo(wdGoToPage, wdGoToAbsolute, , "2").Select
'Select the header on page 2, but I think it selects page 1 instead
'neither of the following statements seems to work
'ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
ActiveWindow.ActivePane.View.SeekView = wdSeekPrimaryHeader
'insert 2nd picture into 2nd page header
'this does not work, picture ends up in first header
Selection.HeaderFooter.Shapes.AddPicture _
(FileName:="C:\second.bmp", _
LinkToFile:=False, SaveWithDocument:=True).Select
Selection.ShapeRange.Name = "secondpage"
'on rest of the pages (different first header). I need to select header
'for rest of pages (not the different, first page header)
'but every change I make seems to affect firstpage header only
'go to the "first page" header
ActiveWindow.ActivePane.View.SeekView = wdSeekFirstPageHeader
'insert a picture into the shapes of the "first page" header
Selection.HeaderFooter.Shapes.AddPicture _
(FileName:="C:\first.bmp", _
LinkToFile:=False, SaveWithDocument:=True).Select
'give the "first page" header picture a name
Selection.ShapeRange.Name = "firstpage"
'goto 2nd page, the 2nd type of header for all other pages
'starts on the second page
ActiveDocument.Range.GoTo(wdGoToPage, wdGoToAbsolute, , "2").Select
'Select the header on page 2, but I think it selects page 1 instead
'neither of the following statements seems to work
'ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
ActiveWindow.ActivePane.View.SeekView = wdSeekPrimaryHeader
'insert 2nd picture into 2nd page header
'this does not work, picture ends up in first header
Selection.HeaderFooter.Shapes.AddPicture _
(FileName:="C:\second.bmp", _
LinkToFile:=False, SaveWithDocument:=True).Select
Selection.ShapeRange.Name = "secondpage"