Solved

vbscript - which operating system is in use

Posted on 2002-06-10
4
145 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

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