I am using TBS to create an MS Word Document from a template in PHP and trying to remove a table depending on a boolean variable.

What I'm trying to do is similar to the following code, but I want to remove a table rather than an object...

[onload;block=mc:AlternateContent;when [var.x_delete]=0]
有帮助吗?

解决方案

I guess you are using TBS with its plugin OpenTBS.

In MS Word, a table is bounded with the element <w:tbl>.

Thus the TBS tag for deleting such a table would be:

[onload;block=w:tbl;when [var.x_delete]=0]

OpenTBS is provided with a synopsis of the main elements of MS Office and LibreOffice.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top