Hi Dave,
In this case, w10:wrap wins
Best,
Mike
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Please note, this is a continuation of a post to the Open Specifications forum: https://social.msdn.microsoft.com/Forums/en-US/b522c4f5-d7bb-433c-a20f-207446132a42/behinddoc-wpwraptopandbottom-w10wrap-style-msowrapstyle?forum=os_binaryfile
Hi all;
When a drawing (or shape or textbox) has these all set, what takes precedent and how do they impact each other. I have a drawing that has behindDoc=1 and <wp:wrapTopAndBottom> so it is first saying let text flow over it and then saying text goes above and below it, but not over it.
What are the official rules for precedent if several are set among the three ways?
??? - thanks - dave
ATE-4269
What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing
Hi Dave,
So first, for behindDoc and wrapTopAndBottom, wrapTopAndBottom takes precedence.
Second, there are two overlapping things here. The wp:wrapTopAndBottom element and the behindDoc attribute of the wp:anchor element, are both under the mc:choice element in an alternate content block. The w10:wrap element is under the mc:fallback element in the alternate content block.
The purpose of an alternate content block is to allow more than one way to represent something. If an application understands the namespaces in the Requires attribute of the mc:Choice element, that means the application can use the content in that choice block. If it doesn't understand those namespaces (typically because the XML was written by a new version of the app where that XML is a new feature), then it can resort to using the XML under the mc:fallback element. So, in other words, we have two sets of XML for representing something, depending on what the application understands.
In this case, w10:wrap is in the fallback section because that's the old way of representing word wrap and even Word 2007 will understand it. More recent versions of Word understand the wp namespace, and will instead use the XML under the mc:Choice element, (wrapTopAndBottom and behindDoc).
So, there should be no interaction between the two methods of representing this. The application will just pick which one it uses.
I hope that answers your question.
Mike
Hi;
Saying wp: is the choice and w10: is the fallback makes this all super clear - thank you.
One final question - behindDoc is solely a z-order thing and has nothing to do with wrapping - correct?
thanks - dave
Hi again:
Ok, if wp:wrapTopAndBottom is there, ignore w10:wrap.
But what about style "mso-wrap-style="? I assume it is ignored if wp:wrapTopAndBottom exists. But if there is no wp: node and there is both w10:wrap and style="mso-wrap-style=...", which of those wins?
thanks - dave
What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing
Hi Dave,
In this case, w10:wrap wins
Best,
Mike