473,385 Members | 1,893 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,385 software developers and data experts.

Finding..

VJ
Hi..

How do I find out if Microsoft Office is installed in the system I am
running my application?.. Also, can I determine the version of office and
individually see if Word, Excel, are installed??

Vijay
Nov 20 '05 #1
11 1075
Hi VJ,

One way, I imagine, would be to check the Registry.I would expect that
there are some standard settings for Office but I don't know what they would
be.

Regards,
Fergus
Nov 20 '05 #2
Here is some pseudo code

Dim oApp as Object '-- Word.Application
Set oApp = CreateObject("Word.Application")
If Not oApp Is Nothing Then ' -- Means Word is Installed
MsgBox oApp.Version
Else
MsgBox "Oops Word is NOT installed :-("
End If

"VJ" <vi********@yahoo.com> wrote in message
news:u0**************@TK2MSFTNGP10.phx.gbl...
Hi..

How do I find out if Microsoft Office is installed in the system I am
running my application?.. Also, can I determine the version of office and
individually see if Word, Excel, are installed??

Vijay

Nov 20 '05 #3
Hi Nice Chap,

Lol, first time I've heard VB6 code called pseudo. ;-)

Regards,
Fergus
Nov 20 '05 #4
Cor
Hi Fergus,

So this new trick you don't forget?

:-))

Cor
Nov 20 '05 #5
I think that is what it is now... but anyway I was also a bit scared to use
the term VB6 on a .net group !! I didn't want to face the wrath :-s !!
"Fergus Cooney" <fi****@post.com> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
Hi Nice Chap,

Lol, first time I've heard VB6 code called pseudo. ;-)

Regards,
Fergus

Nov 20 '05 #6
VJ
Thanks..

VJ

"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message
news:eT**************@TK2MSFTNGP09.phx.gbl...
Here is some pseudo code

Dim oApp as Object '-- Word.Application
Set oApp = CreateObject("Word.Application")
If Not oApp Is Nothing Then ' -- Means Word is Installed
MsgBox oApp.Version
Else
MsgBox "Oops Word is NOT installed :-("
End If

"VJ" <vi********@yahoo.com> wrote in message
news:u0**************@TK2MSFTNGP10.phx.gbl...
Hi..

How do I find out if Microsoft Office is installed in the system I am
running my application?.. Also, can I determine the version of office and individually see if Word, Excel, are installed??

Vijay


Nov 20 '05 #7
VJ
Hi.. guys.. I found something in addition to what you mentioned... this is
the .NET way??

' Define the RegistryKey objects for the registry hives.
Dim regClasses As RegistryKey = Registry.ClassesRoot

' Check whether Microsoft Word is installed on this computer,
' by searching the HKEY_CLASSES_ROOT\Word.Application key.
Dim regWord As RegistryKey = regClasses.OpenSubKey("Word.Application")
If regWord Is Nothing Then
Console.WriteLine("Microsoft Word isn't installed")
Else
Console.WriteLine("Microsoft Word is installed")
End If
' Always close Registry keys after using them.
regWord.Close

VJ

"VJ" <vi********@yahoo.com> wrote in message
news:u0**************@TK2MSFTNGP10.phx.gbl...
Hi..

How do I find out if Microsoft Office is installed in the system I am
running my application?.. Also, can I determine the version of office and
individually see if Word, Excel, are installed??

Vijay

Nov 20 '05 #8
Cor
thanks
Nov 20 '05 #9
Hi Nice Chap,

LOL. I answered a VbScript question the other day. And no-one got dead or
even injured! ;-))

Regards,
Fergus
Nov 20 '05 #10
Hi VJ,

Just to tie the two together:

Nice Chap's showed us
CreateObject ("Word.Application")

You showed us
Registry.ClassesRoot.OpenSubKey("Word.Application" )

CreateObject (sSomeObjectName) actually opens the Registry key:
"HKEY_CLASSES_ROOT\" & sSomeObjectName
in order to create the object (using the CLSID that's there).

Regards,
Fergus
Nov 20 '05 #11
it must have been in the night then when there were no pliceman around ¦-)

"Fergus Cooney" <fi****@post.com> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Hi Nice Chap,

LOL. I answered a VbScript question the other day. And no-one got dead or even injured! ;-))

Regards,
Fergus

Nov 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tristan | last post by:
Im trying to expand a search util by uing regular expression to allow common search criteria such as +-* and phrases "". My understanding of ereg(string pattern, string string, ) is that the...
11
by: Fuzzyman | last post by:
What's the best, cross platform, way of finding out the directory a script is run from ? I've googled a bit, but can't get a clear answer. On sys.argv the docs say : argv is the script name...
1
by: Phil Watkins | last post by:
I am a novice programer in Vb and I am having a major brain ache finding out which item has been selected within a list view and then either deleting that item or editing them. My searching so...
0
by: Helge Jensen | last post by:
Having posted in microsoft.public.dotnet.framework.sdk and microsoft.public.dotnet.framework.wmi without receiving any response, I posthere on the off-chance that someone who isn't following those...
3
by: KL | last post by:
Well, I am back. This time our assignment has us filling a vector and then timing how long it takes to find a spot in the vector to insert a new item, and the time required to insert the item...
8
by: Rick Strahl [MVP] | last post by:
Hi all, I'm building an app that uses the ASP.Net runtime... One problem I've run into is that pages running inside of the runtime are not finding DLLs in the GAC. In fact, if I look at the...
1
by: Doug | last post by:
The html below shows DataList "DiscountList" nested within DataList "EventItemList". DiscountList contains a Label control. I'm trying to find the label, using FindControl, during...
2
by: ElkGroveR | last post by:
Hi there! I'm using PHP to create a simple, dynamic MySQL SELECT query. The user chooses a selection from a HTML Form SELECT element's many options and submits the form via a POST action. ...
0
by: NSF12345 | last post by:
Iv developed a small program that looks for a file over our network, and copy it to the location of another computer. Im using the "If FileExists("\\oldpc\main share\Folder\file.txt") Then" way of...
4
by: krishnai888 | last post by:
I had already asked this question long back but no one has replied to me..I hope someone replies to me because its very important for me as I am doing my internship. I am currently writing a code...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.