'使用DSOFile来获取指定文件的文档属性 Set objDSO=New DSOFile.OleDocumentProperties objDSO.Open sFile '遍历自定义文档属性集合 '如果存在指定名称且取值为是的属性 '则返回True For Each objProperty In objDSO.CustomPropertiesIf(objProperty.Name=sProperty)_And(objProperty.Type=dsoPropertyTypeBool)Then FileHa...
CustomDocumentProperties属性 返回或者设置DocumentProperties集合,代表指定工作簿的所有自定义文档属性。其语法为: Workbook对象.CustomDocumentProperties 自定义属性对应的对话框如图2所示。 图2 该属性返回自定义文档属性的完整的集合,使用Item方法指定属性的名称或索引值来返回集合中...
rw = 1 Worksheets(1).Activate For Each p In ActiveWorkbook.CustomDocumentProperties Cells(rw, 1).Value = p.Name Cells(rw, 2).Value = p.Value rw = rw + 1 Next 支持和反馈 有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。反...
.Offset(, 1).Value = myProperties.Value On Error GoTo 0 End With Next Columns.AutoFit Set wb = Nothing End Sub 运行上面的代码,即可在工作表中,得到如图15-4所示的效果。 图15-4查看属性结果 在上面的代码中,用户可以使用CustomDocumentProperties(index)可返回一个代表特定自定义文档属性的DocumentPropert...
CustomDocumentProperties 取得Microsoft.Office.Core.DocumentProperties 集合,表示活頁簿所有自訂文件屬性。 CustomViews 取得Microsoft.Office.Interop.Excel.CustomViews 集合,表示活頁簿所有自訂檢視。 CustomXMLParts 取得活頁簿中自訂 XML 組件的集合。 DataBindings 取得資料繫結物件的集合,此IBindableComponent。 (繼承...
ContentTypeProperties returns a MetaProperties collection that describes the metadata stored in the workbook. CreateBackup true if a backup file is created when this file is saved. CustomDocumentProperties returns or sets a DocumentProperties collection that represents all the custom document properties for...
Document属性提供对DHTML Object Model的访问途径 TopLevelContainer 返回一个Boolean值,表明IE是否是WebBrowser控件顶层容器,是就返回true Type 返回已被WebBrowser控件加载的对象的类型。例如:如果加载.doc文件,就会返回Microsoft Word Document Left 返回或设置WebBrowser控件窗口的内部左边与容器窗口左边的距离 ...
VBASigned VBProject WebOptions Windows Worksheets WritePassword WriteReserved WriteReservedBy XmlMaps XmlNamespaces Methods Events WorkbookConnection WorkbookEvents WorkbookEvents_ActivateEventHandler WorkbookEvents_AddinInstallEventHandler WorkbookEvents_AddinUninstallEventHandler WorkbookEvents_AfterSaveEventHandler Wor...
使用CustomXMLPart对象保存配置信息 在xlsx版Excel文件中,区别于传统的xls文件,其文件本质是xml文件集合,在xlsx版文件结构中,除去工作表外,有另外一个对象同样可以存储数据,其存储数据的要求只要是xml格式的数据即可。 且此对象不止于在VSTO内使用,在VBA上也同样有此对象可供计用。
在VBA对象浏览器中,我们可以找到所有的内置对话框列表。打开VBE,按F2键打开对象浏览器,在顶部的下拉列表框中选择“Excel”,搜索“XlBuiltInDialog”,显示所有内置对话框成员列表,如下图3所示。 图3 使用下面的程序将这些内置常量输入到Excel工作表中,便于查阅。 代码语言:javascript 代码运行次数:0 运行 AI代码解释...