In my Word add-in, I have a Word Document
object which contains a particular Section
. In this Section
, I append a Shape
:
var shape = section.Headers[WdHeaderFooterIndex.wdHeaderFooterFirstPage].Shapes.AddTextEffect(MsoPresetTextEffect.msoTextEffect1, "Example text...", "Calibri", 72, MsoTriState.msoFalse, MsoTriState.msoFalse, 0, 0, section.Headers[WdHeaderFooterIndex.wdHeaderFooterFirstPage].Range) as Shape;
My issue is that some Word document templates have images or other things that appear over top of my shape. Originally, I thought that setting the Z order would be enough to fix this:
shape.ZOrder(MsoZOrderCmd.msoBringToFront);
It did not. So my question is, how can I absolutely set the Z order of my Shape
, or in other words, what else would I have to do to set in order to make my Shape
such that it becomes the top-most thing you see in the document (meaning, that it appears above all of the other things)?