Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 21st, 2005, 04:00 PM
Registered User
Join Date: Jul 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SysCmd method question...

I'm new to vbscripting and am a bit lost... I am trying to create a script that checks for the installed version of MS Office. I understand that the SysCmd method will give the major version information for MS Access..and therefore the version of MS Office.

My question is... Does this method only work from WITHIN MS Access? I get "...illegal function call..." errors when calling it from a .vbs.

Reply With Quote
  #2 (permalink)  
Old July 22nd, 2005, 04:41 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

SysCmd is access vba not vbscript. Take a look here www.tek-tips.com/viewthread.cfm?qid=1088751 for tips on how to get the access version. But are you sure that you can assume the Access came with MSOffice? I have Office XP (2002) without Access, and I also have Access 97 so if you used that method on my setup you would be assuming I have Office 97!

Here's a way to get the Word version
you can probably do the same for Excel using it's Application object.

Reply With Quote
  #3 (permalink)  
Old July 22nd, 2005, 11:59 AM
Registered User
Join Date: Jul 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Ah - Same idea, but w/Word instead of Access...and it works! :D You're right about the likelihood of someone having a different version of Access than Office (definitely less accurate than Word/Office)...

Thanks Phil!


BTW: In case anyone else is wondering...here's the 4 simple lines of code... Also - You can make it remote by giving the name of the machine when you create the app object.

Set objWord = CreateObject("Word.Application", "Remote_Machine_Name")

4 simple lines:
Set objWord = CreateObject("Word.Application")
Wscript.Echo "Version: " & objWord.Version
Wscript.Echo "Build: " & objWord.Build

Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using SysCmd to create Progress Meter azambee Access VBA 4 August 19th, 2013 01:57 AM
Question about the clone() method ianni Java Basics 1 December 26th, 2007 05:14 AM
Sort Method question rgalehouse Javascript 1 February 10th, 2004 07:03 PM
Question on using the CONFIRM() method savoym Javascript 5 September 11th, 2003 10:34 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.