Try something based on:
Code:
Sub EditHeaderTextBox()
Dim Shp As Shape, Doc As Document, strText As String
Dim i As Long, docToOpen As FileDialog, sHght As Single
On Error GoTo Err_Exit
strText = InputBox("New Text", "Header Textbox Update", "New Text")
' Switch off the updates of screen
Application.ScreenUpdating = False
Set docToOpen = Application.FileDialog(msoFileDialogFilePicker)
docToOpen.Show
For i = 1 To docToOpen.SelectedItems.Count
'Open each document
Set Doc = Documents.Open(FileName:=docToOpen.SelectedItems(i))
With Doc
With .Sections(1)
For Each Shp In .Headers(wdHeaderFooterPrimary).Shapes
With Shp
If .Type = msoTextBox And .Name = "Text Box 1" Then
With .TextFrame
.AutoSize = True
.MarginLeft = 0
With .TextRange
With .Font
.Name = "Arial"
.Size = 10
End With
.Text = strText
End With
End With
End If
.RelativeVerticalPosition = wdRelativeVerticalPositionPage
sHght = .Top + .Height
End With
Next
.PageSetup.TopMargin = sHght
End With
.Close SaveChanges:=wdSaveChanges
End With
Next
Set docToOpen = Nothing: Set Doc = Nothing
' Switch SCreen updates back on
Application.ScreenUpdating = True
Exit Sub
Err_Exit:
MsgBox Err.Description & Err.Number
End Sub