Word 2010 中修改文本框的复选框
我想要一个 MS Word 2010 文档,其中有一个复选框(可检查)和一个文本框(文本字段),其中根据是否单击复选框显示不同的文本。
我尝试过搜索它,但不知何故,所有建议并不意味着作为复选框问题的解决方案...
我认为该解决方案应该在 Visual Basic 中使用?
I want to have a MS Word 2010 document where there is a checkbox (ckeckable) and a textbox (textfield) where different text is displayed depending on whether the checkbox is clicked or not.
I have tried searching for it but somehow all the suggestions are not meant as solutions for the checkbox question...
I would think that the solution should be used in Visual Basic?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的东西吗?
假设您有一个名为
CheckBox1
的复选框和一个名为TextBox1
的文本框。上面的代码位于 ThisDocument 模块中。结果看起来像这样
和这个
。
编辑 哎呀,我用 Excel 制作了这些图片...哦,好吧,它们在 Word 中看起来几乎一模一样。
编辑您现在更改了要求,并希望在取消选中该复选框时“隐藏”文本框。没有正式的方法来“隐藏”文本框,但您可以删除它的可见功能,即它包含的文本以及“凹陷”特效,这样它就无法与背景区分开来:
Something like this?
This assumes you have a checkbox called
CheckBox1
and a text box calledTextBox1
. The above code goes in the ThisDocument module.Result looks like this
and this
.
EDIT Whoops, I made these pics in Excel... Oh well, they look almost identical in Word.
EDIT You have now changed the requirement and want the textbox to "be hidden" when the checkbox is unchecked. There is no formal way to "hide" a textbox, but you can remove it visible features, i.e. the text it contains as well as the "sunken" special effect, such that it is indistinguishable from its background: