Extraction of coordinates of content control in the footer

I am having problem extracting the coordinate of the content control I placed in the footer of a word document.
I did not have this issue with content controls that live in the main body of the document.

It’s the one in the footer… that gives me exception when IReplaceCallback range replace codes get called…
And I used

LayoutCollector collector = new LayoutCollector((Aspose.Words.Document)e.MatchNode.Document);
** enumerator.Current = collector.GetEntity(start);
I am taking exception at this instruction… saying Value cannot be null.

(See the BarCodeREplaceEvaluator class I included in the zip file)
Since I cannot debug into it… Not sure what it is complaining about.

I posted this question earlier… but somehow it disappeared from the forum.
Please advise …
Why am I getting this exception…
I am using the same code to extract coordinates of another content control else where… However that content control does not live in the footer. .I dont know if that has anything to do with it.

I am including my test files…
Thank you. Test.zip (95.5 KB)

A post was merged into an existing topic: Search for Coordinates failed