The information in this article applies to:
SUMMARY
Using the Microsoft WordBasic GetProfileString and GetPrivateProfileString
functions, you can extract information from the Windows Win.ini file if you
are using Windows 3.x or the Registry if you are using Word 7.0.
Word 7.0 for Windows 95 and Word for Windows NTIn Windows 95 and Windows NT, settings are stored in the Registry. You can use SetProfileString and GetProfileString$() to set and return settings from a text file with the name Win.ini (see Word version 6.x macro below), but neither Windows 95, Windows NT, nor Word 7.0 uses these settings. To access values in the Registry from within WordBasic, you need to use the GetPrivateProfileString$() function.In the following macro, the program directory path for Word 7.0 in the Windows registry is retrieved and stored in the proofdir$ variable. Note: For Word for Windows NT, substitute 6.0 for 7.0 in the registry key for GetPrivateProfileString$() shown below.
Word 6.x for WindowsIn the following macro, the proof path under the [MSAPPS] heading in the Win.ini file is retrieved and stored in the A$ variable.
Word 2.x for WindowsIf the DOC-path statement is not present in the [Microsoft Word 2.0] section of your Win.ini file, a dialog box indicates that the default directory has not been set.
Word 1.x for Windows
MORE INFORMATION
If you are using Word 7.0 and the GetPrivateProfileString$() function in
Windows 95 and Windows NT to return a setting in the Registry, you must
specify the complete path to the key, including the root (for example,
"HKEY_CURRENT_USER\software\Microsoft\Word\7.0\Options").
private and text and file REFERENCES
"Using WordBasic," by WexTech Systems and Microsoft, page 228 Additional query words: 1.10a 2.0 6.0 7.0 winword2 winword word6 word7 word95 registry ntword wordnt
Keywords : |
Last Reviewed: September 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |