... my $sections = $doc->Sections->Count(); for(1..$sections) { $doc->Sections($_)->Headers(1)->Range->InsertAfter("New Header Text"); } ..