-1

我有一个 Word 模板,我在其中浏览 TBS 块并动态显示值。现在我想将实际值与显示的最后一个值进行比较。有没有可能用word解决这个问题?

我正在考虑设置一个变量并将最后一个值保存在这个变量中。所以我只需要将自己的变量与实际值进行比较。但我不知道这是否可能。有什么帮助或其他建议吗?

例子

*[myblock;block=begin]
[myblock.entry] // here I want to check if its the same as the last entry
[myblock;block=end]*
4

1 回答 1

0

TinyButStrong 在本机中无法做到这一点。

但是您可以使用参数 « ondata » 和 PHP 用户函数来在当前记录中添加先前的值。

您还可以使用对象的方法(参见TBS 文档

PHP:

function f_ondata_user($BlockName, &$CurrRec, $RecNum) {
   static    $entry_prev = '';
   $CurrRec['entry_prev'] = $entry_prev;
   $entry_prev =    $CurrRec['entry'];
}

模板 :

*[myblock;block=begin;ondata=f_ondata_user]
[myblock.entry]
[myblock.entry_prev]  // here I want to check if its the same as the last entry
[myblock;block=end]*
于 2016-06-24T12:03:28.593 回答