Solved

vbscript - which operating system is in use

Posted on 2002-06-10
4
146 Views
Last Modified: 2010-05-02
Can someone provide me with a vbscript (must work in Outlook 97) which will tell me which operationg system is in use, particularly NT 4.0 and Windows 2000.

Thanks in advance
0
Comment
Question by:toffee
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 100 total points
ID: 7066996
http://www.mvps.org/vbnet/index.html?code/system/getversionex.htm

Provides a VB example, to run this in Outlook you would need to convert the Public declarations to Private and paste this directly into a userform, or create a module and paste the code as-is and call the described method(s).
0
 

Author Comment

by:toffee
ID: 7068227
TimCottee

Will this work with Outlook 97 which only has VBScript?  I'm only a novice but I thought I read somewhere you can't use API's with VBScript.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7069331
Outlook 97 has VBA rather than VBScript, VBScript is the scripting language used in client-side web pages whereas VBA is pretty close to the main VB IDE but has greater integration to the application that hosts it. It also has some limitations in terms of the kinds of objects you can use and create. However you can use API calls in VBA so there is no reason why this will not work. In fact I have used this and similar code in outlook 2000 with no problems.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7873524
toffee, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Accept TimCottee's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question