VBA操作Word中Documents/Document对象属性介绍
时间:2023-12-13 02:57:42
如果您想通过VBA操作word,如下Documents/Document对象的属性,应该对您有所帮助。
ActiveDocument.AttachedTemplate.FullName '返回当前文档采用的模板名及模板所在位置
ActiveDocument.Bookmarks.Count '返回当前文档中的书签数
ActiveDocument.Characters.Count '返回当前文档的字符数
ActiveDocument.CodeName ‘返回当前文档的代码名称
ActiveDocument.Comments.Count ‘返回当前文档中的评论数
ActiveDocument.Endnotes.Count '返回当前文档中的尾注数
ActiveDocument.Fields.Count '返回当前文档中的域数目
ActiveDocument.Footnotes.Count ‘返回当前文档中的脚注数
ActiveDocument.FullName '返回当前文档的全名及所在位置
ActiveDocument.HasPassword '当前文档是否有密码保护
ActiveDocument.Hyperlinks.Count '返回当前文档中的链接数
ActiveDocument.Indexes.Count '返回当前文档中的索引数
ActiveDocument.ListParagraphs.Count '返回当前文档中项目编号或项目符号数
ActiveDocument.ListTemplates.Count '返回当前文档中使用的列表模板数
ActiveDocument.Paragraphs.Count '返回当前文档中的段落数
ActiveDocument.Password=XXX '设置打开文件使用的密码
ActiveDocument.ReadOnly '获取当前文档是否为只读属性
ActiveDocument.Saved '当前文档是否被保存
ActiveDocument.Sections.Count '当前文档中的节数
ActiveDocument.Sentences.Count ‘当前文档中的语句数
ActiveDocument.Shapes.Count '当前文档中的形状数
ActiveDocument.Styles.Count '当前文档中的样式数
ActiveDocument.Tables.Count ‘当前文档中的表格数
ActiveDocument.TablesOfAuthorities.Count ‘返回当前文档中的引文目录数
ActiveDocument.TablesOfAuthoritiesCategories.Count ‘返回当前文档中引文目录类别数
ActiveDocument.TablesOfContents.Count ‘返回当前文档中的目录数
ActiveDocument.TablesOfFigures.Count '返回当前文档中的图表目录数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
xp系统hiberfil.sys文件能删除吗?
![](https://img.aspxhome.com/file/2023/4/a306442_0s.jpg)
Win10系统鼠标右键菜单没有以管理员身份运行的解决方法
![](https://img.aspxhome.com/file/2023/3/a300517_0s.jpg)
小米笔记本怎么重装Win10?小米笔记本重装Win10教程
![](https://img.aspxhome.com/file/2023/8/52598_0s.png)
wegame怎么添加游戏到心愿单_wegame添加游戏到心愿单详细教程
![](https://img.aspxhome.com/file/2023/5/a316542_0s.jpg)
win7快速启动栏没了快速启动栏不见了是什么原因如何解决
![](https://img.aspxhome.com/file/2023/29/a254462_0s.jpg)
excel排序功能 使用技巧
![](https://img.aspxhome.com/file/2023/9/a154689_0s.jpg)
WPS表格中制作斜线表头的方法有哪些
电脑黑屏提示reboot and select proper boot device怎么办?
![](https://img.aspxhome.com/file/2023/30/a269133_0s.png)
Windows10累积更新补丁kb4034658下载地址 32位/64位
![](https://img.aspxhome.com/file/2023/29/a260511_0s.jpg)
Excel中A1样式和R1C1引用样式怎么用?
![](https://img.aspxhome.com/file/2023/2/41722_0s.png)
win10系统声卡和无线网卡驱动出问题怎么办?
![](https://img.aspxhome.com/file/2023/28/a249437_0s.jpg)
word2003怎么自动生成不改变文档的间距的目录?
Excel中ACOSH函数的语法和用法
![](https://img.aspxhome.com/file/2023/3/a155913_0s.png)
excel多人同时编辑怎么设置 excel实时在线编辑最新最全教程
![](https://img.aspxhome.com/file/2023/9/40449_0s.jpg)
Excel多条件.指定内容的高级筛选
![](https://img.aspxhome.com/file/2023/7/37647_0s.gif)
serialVersionUID如何生成?serialVersionUID有什么作用?
![](https://img.aspxhome.com/file/2023/8/a340201_0s.jpg)
Win11怎么不让软件联网?Win11禁止某个软件联网的方法
![](https://img.aspxhome.com/file/2023/27/a235459_0s.jpg)
Win10如何进行个性化设置和输入法设置
![](https://img.aspxhome.com/file/2023/26/a227752_0s.jpg)
Win11系统msvcr110.dll丢失的解决方法
![](https://img.aspxhome.com/file/2023/27/a236881_0s.png)
Word文档打印小技巧
![](https://img.aspxhome.com/file/2023/1/34101_0s.jpg)