ReplaceText in Header sections

Feb 18, 2015 at 11:10 AM
Dim tmp_DocXFile As Exa.Extensions.DocX.DocX = Nothing

tmp_DocXFile = Exa.Extensions.DocX.DocX.Load("D:\Temp\Test.docx")

If tmp_DocXFile.Headers.odd IsNot Nothing Then
    For Each phf In tmp_DocXFile.Headers.odd.Paragraphs
        phf.ReplaceText("{{Firma_DIC}}", "AAA") 'DONT WORK
    Next
End If

If tmp_DocXFile.Headers.even IsNot Nothing Then
    For Each phf In tmp_DocXFile.Headers.even.Paragraphs
        phf.ReplaceText("{{Firma_DIC}}", "Fero piča")  'DONT WORK
    Next
End If

If tmp_DocXFile.Headers.first IsNot Nothing Then
    For Each phf In tmp_DocXFile.Headers.first.Paragraphs
        phf.ReplaceText("{{Firma_DIC}}", "Fero piča")   'DONT WORK
    Next
End If

tmp_DocXFile.ReplaceText("{{Firma_DIC}}", "Fero piča") 'OK
tmp_DocXFile.Save()
tmp_DocXFile.Dispose()

Is it possible to fix it?