Search notes:

Office Object Model: Excel - Application

Build

build might return something like
At least on Outlook, this property is not available.

Name

name identifies the Office application that hosts this application object, the value is Microsoft Access or Microsoft Word or Microsoft Excel etc.

Path

application.path returns the installation root of an Office installation, for example C:\Program Files (x86)\Microsoft Office\Root\Office16.
This property is unavailable in Outlook.
The path where a particular Excel workbook is stored is returned by workbook.path.
Similarly, the path of a Word document is returned by `document.path.

ProductCode

productCode returns a GUID that identifies Office version and edition.

Version

application.version returns a short version id of the Office application (for example 15.0 for 2013).
This short version can be used to locate the relevant sections in the registry under HKEY_CURRENT_USER\Software\Microsoft\Office, for example HKCU\Software\Microsoft\Office\15.0.

DisplayAlerts

In Access, see also doCmd.setWarnings
Setting displayAlerts to false does not prevent the There is a large amount of information on the Clipboard… message when closing a workbook.
See also displayAlerts in Excel's application object.

Measurement conversion routines

The Application object provides some methods to convert from various (length related) measurement units. These might be useful, for example, for Word PageSetup object.
option explicit

sub main() ' {

    debug.print "  1 inch:   " & application.inchesToPoints      (  1) & " points."
    debug.print "  1 cm:     " & application.centimetersToPoints (  1) & " points."

    if application.name = "Microsoft Word" then
    '
    '  Excel apparently lacks a few conversion methodes.
    '
       debug.print "  1 mm:     " & application.millimetersToPoints(  1) & " points."
       debug.print "  1 point:  " & application.pointsToCentimeters(  1) & " cm."
       debug.print "  1 point:  " & application.pointsToMillimeters(  1) & " mm."
       debug.print "180 points: " & application.pointsToInches     (180) & " inches."
       debug.print "100 points: " & application.pointsToPicas      (100) & " picas."
       debug.print " 25 picas:  " & application.picasToPoints      ( 25) & " points."
    end if

end sub  ' }
Github repository about-MS-Office-object-model, path: /common/Application/measurement-conversion.bas

See also

The Application object in Excel and Access

Index