On both of those lines I think you need the Application object rather than the Document object.


Try replacing wrdDoc with the object you have for the application (maybe wrdApp.?), or wrdDoc.Application


However, this section of your code (with my comments):
VB Code:
  1. 'select header
  2. wrdDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
  3. If wrdDoc.Selection.HeaderFooter.IsHeader = True Then
  4.   'if header is selected [which it is!], select footer
  5.   wrdDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
  6. Else
  7.   '.. else select header [should never happen]
  8.   wrdDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
  9. End If
could be replaced with this for the same effect:
VB Code:
  1. 'select the footer
  2. wrdDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter