The Options Object

The Options object is used to set various Word options. It has a whopping 144 properties, but only one method: SetWPHelpOptions, which sets the options for the WordPerfect Help feature.

Here is an example of code that sets three Word options. Note that since the Options property is global, you can use it without qualification; that is, you can write Options rather than Application.Options:

	With Options
	    .AnimateScreenMovements = False 
	    .CheckSpellingAsYouType = False
	    .MeasurementUnit = wdPoints
	End With

The System Object

The System object contains information about the computer upon which the code is running. The System object has one very interesting method: MSInfo, which starts the Microsoft System Information application. This one you should try for yourself by entering the code:

	System.MSInfo

The properties of the System object:

Application

HorizontalResolution

PrivateProfileString

ComputerType

LanguageDesignation

ProcessorType

Connect

MacintoshName

ProfileString

Country

MathCoprocessorInstalled

QuickDrawInstalled

Creator

MSInfo

Version

Cursor

OperatingSystem

VerticalResolution

FreeDiskSpace

Parent

 

One of the most useful properties of the System object is PrivateProfileString, which provides a way to save and retrieve string data in a special type of text file, typically called an initialization file or INI file (with an .ini file extension), because it is used to store data that is used to initialize settings in an application. As you probably ...

Get Writing Word Macros, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.