Thanks ! I tried your code and I get a type mismatch with the line Set oRng = ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range
I tried changing oRng into a Variant. I did not get this type mismatch error however when I run the code it crashes the word application. Any idea How I could fix this ?