Using a Macro to Tell If 16- or 32-Bit Word Currently Running |
Q123303
This article describes how to use the AppInfo$() function to return information about whether you are running the 16-bit version of Word (Word for Windows) or the 32-bit version of Word (Word for Windows NT). This information is important when you use macros that must access functions in Windows DLL files because 32-bit applications can only access 32-bit DLLs.
NOTE: This article assumes a basic working knowledge of WordBasic.
The AppInfo$() function can return one of 25 types of information about the
Word application. To determine the operating system, which in turn
indicates whether you are running the 16-bit or the 32-bit version, use the
following command:
AppInfo$(1)
Sub MAIN
System$ = AppInfo$(1)
If Instr(System$,"NT") Then
MsgBox "This is NT Word"
Else
MsgBox "This is 16-bit Word"
End Sub
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN
RISK. Microsoft provides this macro code "as is" without warranty of any
kind, either express or implied, including but not limited to the implied
warranties of merchantability and/or fitness for a particular purpose.
For additional information, please see the following article in the
Microsoft Knowledge Base:
Q128944 Handling Cross-Platform Differences in WordBasic
"Microsoft Word Developer's Kit," version 6.0, pages 258-259
Additional query words: 6.0 winword ntword wordnt macro wordbasic word6 appinfo appinfo$() appinfo$
Keywords : kbmacroexample kbofficeprog
Issue type :
Technology :
|
Last Reviewed: March 28, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |