模板组件在新文档中不起作用 [英] Template components not working in new documents

查看:62
本文介绍了模板组件在新文档中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我创建了一个文档作为表单,包含几个按钮和一些文本框和下拉列表。 下拉列表已填充所需的输入选项等。 这些按钮背后都有VBA代码,
似乎都运行良好。 我将文档保存为启用宏的模板(.dotm)。 但是,当我双击模板时,新文档会打开并且所有文本和按钮都存在但文本框具有
i将文档保存为模板时设置的值,并且下拉列表具有将文档另存为模板时选择的值。 此外,它们不能被选为下拉菜单或编辑框。 这里出了什么问题? 当新的
文档打开时,它确实具有"兼容模式"。在标题栏上,我通过选择文件>>删除它转换但编辑框和下拉列表仍然像文本一样。 我该如何解决这个问题?

I have created a document to act as a form and contains several buttons and a number of text boxes and drop down lists.  the drop down lists have been populated with the desired input options etc.  The buttons all have VBA code behind them and all seems to work well.  I saved the document as a macro enabled template (.dotm).  However, when I double click on the template a new document does open and all the texts and buttons are present but the text boxes have the value that was set when i saved the document as a template, and the drop down lists have the value selected when the document was saved as a template.  Furthermore they cannot be selected as drop downs or edit boxes.  What is going wrong here please?  When the new document opens it does have the "compatibility mode" on the title bar and I remove this by selecting File >> Convert but the edit boxes and drop down lists remain just as text.  How can I resolve this please?

谢谢

推荐答案

你好
alanjo,

你说你已经创建了一个启用宏的模板。

you said that you had created a macro enabled template.

但是当你加倍时,点击模板。它会创建一个新文档。

but when you double click on template. it create a new document.

你可以检查这个文件是否正常.docx文件。

you can check that this document is normal .docx document.

它不包含你写过的任何代码对于控件。

which does not contains any code that you had wrote for the controls.

因为这个原因你无法看到下拉列表中的值而无法更改它。

because of this reason you are not able to see the values inside dropdown and not able to change it.

问候

Deepak


这篇关于模板组件在新文档中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆