什么是Microsoft Word 2003中的DOCVARIABLE
?我如何设置它?如何让它显示在我的Word文档中?什么是word中的DOCVARIABLE
12
A
回答
3
如何使我的word文档中显示:
插入 - >现场>类别:DocumentAutomation->字段名称:DocVariable->域代码按钮 - >然后输入变量的名称。
6
您可以使用Microsoft Visual Basic for Applications Variables集合来设置和检索Word文档或模板中字符串变量的内容。
另外,可以使用DocVariable字段检索文档变量的值,该值已设置为在Word文档中显示。
来源:How to store and retrieve variables in Word documents
Sub GetSetDocVars()
Dim fName As String
fName = "Jeff Smith"
' Set contents of variable "fName" in a document using a document
' variable called "FullName".
ActiveDocument.Variables.Add Name:="FullName", Value:=fName
' Retrieve the contents of the document variable.
MsgBox ActiveDocument.Variables("FullName").Value
End Sub
+0
但是像这个代码进入什么地方?这是一个Word脚本或什么? – 2016-12-16 14:28:01
相关问题
- 1. C中的WORD类型是什么?
- 2. 在下面的代码中,word ='word'和words = []是做什么的?
- 3. 什么是从PHP中的Word模板生成Word文档的最佳方式?
- 4. 什么时候宏不是宏? (MS Word)
- 5. JAVA在文本框中操作docx DOCVARIABLE
- 6. 什么是在Android中创建Word文档的好API?
- 7. 当WORD是一个变量时,为什么在'case WORD in`语句中WORD的字段拆分不会发生?
- 8. 为什么AddOLEObject在MS Word
- 9. `word-break:break-all`和`word-wrap:break-word`有什么区别?
- 10. MIPS中.word和.equ有什么区别?
- 11. 使用Profinet的UINT和WORD之间的区别是什么
- 12. 为什么Perl和Word VBA中Word文档中的页面数量不同?
- 13. 与MS Word命令等效的Excel是什么?
- 14. 什么是加密word和pdf文件的最简单方法?
- 15. MS Word内容控件的好处是什么?
- 16. 在我的可执行文件的objdump中.word的地址是什么意思?
- 17. 为什么Word中的应用程序常量不是C++ Builder的
- 18. 什么是从XML文件中将美国Word替换为英国Word的最佳方式
- 19. $ {var:-word}和$ {var-word}之间有什么区别?
- 20. “var = $ {var:-word}”和“var = $ {var:= word}”有什么区别?
- 21. 什么是`git diff --word-diff'默认正则表达式?
- 22. 当从Microsoft Word Online粘贴时,什么是paraid和paraeid?
- 23. 为什么Excel/Word 2013开始隐形?
- 24. word-break:break-all; - 什么可以取代?
- 25. 为什么不会VBScript粘贴? Word 2013
- 26. 什么定义了MS-Word中的一个句子?
- 27. 为什么Word中的形状出现空行?
- 28. 为什么我的宏不能在Word中自动运行?
- 29. 这段代码中的IEventRepository是什么? Resolver.resolve()是做什么的?
- 30. 什么是HttpCallback <T>中的目的和什么是T?
并只显示他们Alt + F9 – 2016-07-06 17:01:48