473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Add reference to Graph.exe for different versions of ms office

I'm doing some graph manipulation in VBA, and have made a reference (and am using successfully) the Graph.exe for MS Office. My problem is that I can't be sure exactly what version of Access my end users will be using--or more precisely where their Graph.exe lives. So for some, the reference will point to C:\Program Files\Microsoft Office\OFFICE11\Graph.exe and for others it might be C:\Program Files\Microsoft Office\OFFICE10\Graph.exe. Also what if they didn't install Office to its default location? I'm compiling and releasing an .mde file, but aren't sure how to get around this problem. Thanks in advance, Mike.
Sep 11 '07 #1
1 4559
MMcCarthy
14,534 Expert Mod 8TB
I'm doing some graph manipulation in VBA, and have made a reference (and am using successfully) the Graph.exe for MS Office. My problem is that I can't be sure exactly what version of Access my end users will be using--or more precisely where their Graph.exe lives. So for some, the reference will point to C:\Program Files\Microsoft Office\OFFICE11\Graph.exe and for others it might be C:\Program Files\Microsoft Office\OFFICE10\Graph.exe. Also what if they didn't install Office to its default location? I'm compiling and releasing an .mde file, but aren't sure how to get around this problem. Thanks in advance, Mike.
Hi Mike

You can use this function triggered in a suitable location to determine the version of Access being used. Then use a SELECT CASE statement to determine the path to the Graph.exe

Expand|Select|Wrap|Line Numbers
  1. Function GetVersion() As String
  2.      GetVersion = SysCmd(acSysCmdAccessVer)
  3.  End Function
  4.  
Something like the following for the SELECT CASE statement ...

Expand|Select|Wrap|Line Numbers
  1. Dim version As String
  2.  
  3.     version = GetVersion
  4.  
  5.     SELECT CASE version
  6.  
  7.     Case "10.0"
  8.         path = "C:\Program Files\Microsoft Office\OFFICE10\Graph.exe."
  9.     Case ....etc.
  10.  
  11.     END SELECT
  12.  
These are the versions:

8.0 = Access 97
9.0 = Access 2000
10.0 = Access 2002(XP)
11.0= Access 2003
12.0= Access 2007
Sep 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mart Rogers | last post by:
We have a situation where we have decided (in an attempt to keep things simple) to stick to local assemblies rather than global ones. However we now have the following situation looming AssyA ...
1
by: KWilliams | last post by:
Hello, We are trying to set up replication between different versions of SQL Server (7 & 2000). This is how the 2 servers are now setup: DB1 - External web-server w/SQL Server 7 DB2 -...
0
by: Ken Durden | last post by:
I'm working on a client-server application where the client is controlling two devices (aka servers) which both implement the same interface contract. We have a set of about 4 assemblies which...
1
by: Jonathan Fong | last post by:
Hi, I am seeking advice about handling different versions of APIs of office which I am writing a plug-in application for it in C# language. Which is the best way to do? 1. Resolving...
1
by: Max M | last post by:
I would like to install several copies of Python 2.4.2 on my machine, but it doesn't seem to be possible. If I allready has a version installed, the installer only gives the options to: -...
8
by: Mary Jane Pronio | last post by:
Any information would be greatly appreciated~~!! Thanks!
6
by: Ecohouse | last post by:
I have a computer with XP on it. I loaded Office 97 first because I needed Access 97 for some work. I then loaded Office 2000. Everything seemed to be running fine. But I have come across a few...
0
by: Brinkie | last post by:
Hi, I have the following situation: I have a COM enabled application installed on multiple machines. I'm building a management application for the COM application. Normaly this is very easy...
1
by: mark_vogt | last post by:
Greetings all, Here's an interesting problem that (oddly) has never happened to me before: ====================================================== A. I just purchased 2 different controls from...
0
by: Fredrik Lundh | last post by:
mercado mercado wrote: if you already have two different versions of the script, what stops you from making changes to them? cannot you just insert the appropriate directory in sys.path...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.