System.ProfileString property (Word)
Returns or sets a value for an entry in the Windows registry under the following subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\version\Word
. Read/write String.
Syntax
expression. ProfileString
( _Section_
, _ Key_
)
expression An expression that returns a 'System' object.
Example
This example retrieves and displays the startup path stored in the Windows registry.
MsgBox System.ProfileString("Options", "STARTUP-PATH")
This example sets and returns the value for an entry in the Windows registry (the SubkeyName subkey is added below HKEY_CURRENT_USER\Software\Microsoft\Office\version\Word
).
System.ProfileString("SubkeyName", "EntryName") = "Value"
MsgBox System.ProfileString("SubkeyName", "EntryName")
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for