Syntax
AppInfo$(Type)
Remarks
Returns one of 24 types of information about the Word application. Note that the GetSystemInfo$() function returns similar information. Also, you can use the GetSystemInfo statement to fill an array with system information.
Type is one of the following numeric codes, specifying the type of information to return.
Type | Explanation | |
1 | Environment (for example, "Windows 3.10" or "Macintosh 7.1"). | |
2 | Word version number (for example, "6.0"). | |
3 | Returns –1 if Word is in a special mode (for example, CopyText or MoveText mode). | |
4 | In Windows, distance from the left edge of the screen to the left border of the Word window, in points (72 points = 1 inch). Note that when Word is maximized, AppInfo$(4) returns a negative value to indicate the borders are beyond the edge of the screen (this value varies depending on the width of the borders). On the Macintosh, AppInfo$(4) returns –1. | |
5 | In Windows, distance from the top of the screen to the top border of the Word window, in points. Note that when Word is maximized, AppInfo$(5) returns a negative value to indicate the borders are beyond the edge of the screen (this value varies depending on the width of the borders). On the Macintosh, AppInfo$(5) returns 1. | |
6 | Width of the workspace, in points. In Windows, the width increases as you widen the Word window. Note that increasing the zoom percentage decreases the return value, and vice versa. | |
7 | Height of the workspace, in points; the height increases as you hide Word screen elements or, in Windows, increase the height of the Word window. Note that increasing the zoom percentage decreases the return value, and vice versa. | |
8 | Returns –1 if the application is maximized (on the Macintosh, this is always the case). | |
9 | Total memory, in kilobytes. In Windows 95 and Windows NT, this value returns 0 (zero). | |
10 | Available memory, in kilobytes. In Windows 95 and Windows NT, this value returns 0 (zero). | |
13 | Returns –1 if a math coprocessor is installed. | |
14 | Returns –1 if a mouse is installed. | |
15 | Available disk space, in kilobytes. | |
16 | Returns the language version of Word. For example, returns "Français" for the French version of Word. For a list of languages, see ToolsLanguage. |
Type | Explanation |
17 | Returns the list separator setting. |
18 | Returns the decimal setting. |
19 | Returns the thousands separator. |
20 | Returns the currency symbol. |
21 | Returns the clock format. |
22 | Returns the A.M. string. |
23 | Returns the P.M. string. |
24 | Returns the time separator. |
25 | Returns the date separator. |
26 | In Windows NT, returns 1 if the A.M. and P.M. strings are displayed before time values or 0 (zero) if they are displayed after. In Windows 95, returns 0 (zero). In Word version 6.0, this value is not available and generates an error. |
Example
This example displays a message box containing the version number of Word:
ver$ = AppInfo$(2) MsgBox ver$, "Microsoft Word Version", 64
The following macro shows how you might use a user-defined function to check the current platform before running an instruction. This technique is useful for macros designed to run both in Windows and on the Macintosh.
Sub Main If fMac Then MsgBox "Current platform is Macintosh" End Sub Function fMac a = InStr(AppInfo$(1), "Macintosh") If a Then fMac = -1 End Function
See Also
AppGetNames, GetSystemInfo