Solved

Powerpoint version and location detection

Posted on 2010-09-07
5
694 Views
Last Modified: 2012-05-10
How do  you programmatically find the version and location of powerpoint on a win 7 system.
0
Comment
Question by:itrphil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 2

Expert Comment

by:coronoahcoro
ID: 33624064
what programming language are you using? VBA?
0
 

Author Comment

by:itrphil
ID: 33624084
IT's C#

Thanks
0
 
LVL 3

Accepted Solution

by:
Chocco earned 500 total points
ID: 33624520
You could try the following Code;

You can use the following code:

private bool IsOutlookInstalled()
{
Type requestType = Type.GetTypeFromProgID("Powerpoint.Application", false);
if (requestType == null)
{
RegistryKey key = null;
try
{
key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Office", false);
if (key != null)
{
double version = 0.0, temp = 0.0;
string[] valueNames = key.GetSubKeyNames();
for(int i=0; i<valueNames.Length; i++)
{
temp = 0.0;
try
{
temp = Convert.ToDouble(valueNames[i],
CultureInfo.CreateSpecificCulture("en-US").NumberFormat);
}
catch
{
}
if (temp > version) version = temp;
}
key.Close();
if (version != 0.0)
requestType = Type.GetTypeFromProgID("Powerpoint.Application."+version.ToString().Replace(",", "."), false);
}
}
catch
{
if (key != null) key.Close();
}
}
return (requestType != null);
}

private int GetOfficeVersion()
{
RegistryKey key = null;
try
{
key = Registry.ClassesRoot.OpenSubKey(Powerpoint.Application\\CurVer", false);
if (key != null)
{
string version = key.GetValue("", "Powerpoint.Application.9").ToString(); key.Close();
int pos = version.LastIndexOf(".");
if (pos >= 0)
{
version = version.Remove(0, pos+1);
return Convert.ToInt32(version);
}
}
}
catch(Exception e)
{
if (key != null) key.Close();
module.DoError(e);
}
return 9;
}
0
 

Author Comment

by:itrphil
ID: 33665438
Does this matter if we have a virtualized version of Office 2010 ?  eg. It seems Office 2010 Home and Student have different Registry entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\PowerPoint\InstallRoot

 than the typical  

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\PowerPoint\InstallRoot

0
 

Author Closing Comment

by:itrphil
ID: 33686091
Need also to know how to find MS 2010 Office Home and Student , Home and Business, and Starter

All these versions uses Microsoft new virtualization App-V CVH.EXE to deliver codes.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

730 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