Thank you! That worked perfectly on my first try!!!
If there is no data for the table, I simply created one row of fake data containing recognizable text, then placed that into the table with replaceTableVariable(). After that I deleted the table following the example like this:
$referenceNode = array(
'type' => 'table',
'contains' => 'DeleteDelete',
);
$docx->removeWordContent($referenceNode);
The user is making the template so I don't know anything about it unless I insert my own content. Does this sound like a good approach, or is there an easier way?
I think your reply stopped one or two words short. You said "deleteTemplateBlock is designed to work with ."
What is that designed to work with?