ActiveDocument.AttachedTemplate.FullName '返回当前文档采用的模板名及模板所在位置
ActiveDocument...
如果您想通过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 '返回当前文档中项目编号或项目符号数
vba设置word文档的格式
vba设置word文档的格式 ①将格式应用于选定内容 下列示例使用Selection属性将字符和段落格式应用于选定文本。使用Font属性获得字体格式的属性和方法,使用ParagraphFormat属性获得段落格式的属性和方法。 Sub FormatSelection() With Selection.Font .Name =
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 '返回当前文档中的图表目录数
如何让WORD的宏随文档的打开自动运行
如何让WORD的宏随文档的打开自动运行 因为word自定义宏是不能自动运行的。 下面,本站与您分享一下,经过实践证明可行的方法,让您的宏随文档的打开而自动运行。 前提条件:您的word宏的安全级别设置为中或低。 理论指导:通过word所允许的能够随文档的打开而自动运行的默认宏,调用自定义宏,这样,我们平时自制的word自定义宏,就能实现自动运行了。 比如,您有一个自定义的倒计时的宏,代码大概如下: Sub Timer() '其中的代码已省略。 End Sub '欲想知道倒计时宏代码范例,请您参阅此文


