Home Forums General XMetaL Discussion ToggleInline Reply To: ToggleInline

Derek Read

Reply to: ToggleInline

Unfortunately, it looks like this is a known issue that has yet to be addressed, or at least there is another issue that looks like this one. I'm not sure exactly what the exact issue is here because other Schemas and instances I have tried are OK. Development will be looking into it though.

In my testing the following are working:
Selection.Surround("B")
Selection.SurroundNS("http://www.tempuri.org/paper","B")
Selection.RemoveContainerTags()

So, all is not lost. I believe adding a little bit of logic together with those APIs makes it possible to obtain the same results. Something like this:

'XMetaL Script Language VBScript:
SET rng = ActiveDocument.Range
if (rng.ContainerName = "B") then
rng.RemoveContainerTags()
else
rng.Surround("B")
rng.Select()
end if

(written in VBScript as it looks like you are either working with VB or VBScript, just a guess)

Reply

Products
Downloads
Support