返回或设置 Windows 注册表中下列子关键字的项的值:HKEY_CURRENT_USER\Software\Microsoft\Office\version\Word。String 类型,可读写。
expression.ProfileString(Section, Key)
expression 必需。该表达式返回一个 System 对象。
Section String 类型,必需。位于 Windows 注册表子关键字“HKEY_CURRENT_USER\Software\Microsoft\Office\version\Word”下面的子关键字。
Key String 类型,必需。由 Section 指定的子关键字中的项的值(例如,“选项”关键字中的“BackgroundPrint”)。
本示例检索并显示存储在 Windows 注册表中的启动路径。
MsgBox System.ProfileString("Options", "STARTUP-PATH")
本示例设置并返回 Windows 注册表的某项的值(“SubkeyName”子关键字添加在 HKEY_CURRENT_USER\Software\Microsoft\Office\version\Word 之下)。
System.ProfileString("SubkeyName", "EntryName") = "Value"
MsgBox System.ProfileString("SubkeyName", "EntryName")