Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能告诉我如何使用 OLE 对象在 word 文档中设置复选框的值?
我在 Word 文档中使用表单域(下拉菜单和复选框)。
我正在使用 PB 7。
谢谢!
我不能给你确切的 PB 语法,但我可以给你 Word 对象模型语法,你不应该有任何“翻译”困难。
oDocument.FormFields(index).CheckBox.Value = true 'or false
index可以是文档中的位置(文本中的第n个表单域),也可以是字符串形式的表单域名称(例如“Check1”)。
index
请注意,无法使用宏记录器来获取此语法,因为宏记录器不会在作为表单保护的文档中运行,并且如果文档未作为表单保护,则无法更改复选框值。