Class System (Word VBA)

Contains information about the computer system.


To use a System class variable it first needs to be instantiated, for example

Dim sys as System
Set sys = System

System class variables can be set using the Application.System procedure.


Other Methods

Connect - Establishes a connection to a network drive.

Dim strPath As String: strPath =  
System.Connect Path:=strPath



Dim strComputerType As String
strComputerType = System.ComputerType

CountryRegion returns the country/region designation of the system.

Dim wcyCountryRegion As WdCountry
wcyCountryRegion = System.CountryRegion

Cursor returns or sets the state (shape) of the pointer. Can be one of the following WdCursorType constants: wdCursorIBeam, wdCursorNormal, wdCursorNorthwestArrow, or wdCursorWait.

System.Cursor = wdCursorIBeam

FreeDiskSpace returns the available disk space for the current drive, in bytes. Use the ChDrive statement to change the current drive.

Dim lngFreeDiskSpace As Long
lngFreeDiskSpace = System.FreeDiskSpace

HorizontalResolution returns the horizontal display resolution, in pixels.

Dim lngHorizontalResolution As Long
lngHorizontalResolution = System.HorizontalResolution

LanguageDesignation returns the designated language of the system software.

Dim strLanguageDesignation As String
strLanguageDesignation = System.LanguageDesignation


Dim strMacintoshName As String
strMacintoshName = System.MacintoshName

MathCoprocessorInstalled true if a math coprocessor is installed on the system.

Dim booMathCoprocessorInstalled As Boolean
booMathCoprocessorInstalled = System.MathCoprocessorInstalled

OperatingSystem returns the name of the current operating system (for example, "Windows" or "Windows Server").

Dim strOperatingSystem As String
strOperatingSystem = System.OperatingSystem

Parent returns an object that represents the parent object of the specified System object.

Dim objParent As Object
Set objParent = System.Parent

PrivateProfileString returns or sets a string in a settings file or the Microsoft Windows registry.

Dim strFileName As String: strFileName = 
Dim strSection As String: strSection = 
Dim strKey As String: strKey =  
System.PrivateProfileString(FileName:=strFileName, Section:=strSection, Key:=strKey) =

ProfileString returns or sets a value for an entry in the Windows registry under the following subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\version\Word.

Dim strSection As String: strSection = 
Dim strKey As String: strKey =  
System.ProfileString(Section:=strSection, Key:=strKey) =


Dim booQuickDrawInstalled As Boolean
booQuickDrawInstalled = System.QuickDrawInstalled

Version returns the version number of the operating system.

Dim strVersion As String
strVersion = System.Version

VerticalResolution returns the vertical screen resolution in pixels.

Dim lngVerticalResolution As Long
lngVerticalResolution = System.VerticalResolution