-
Aug 23rd, 2007, 01:27 AM
#1
Thread Starter
Member
[RESOLVED] registry key
Hello All,
Currently i m working on a project (new to vb) , i need to know whether the msword is installed in current system or not. and i want to know it thru registry entry. I can use "Software/Microsoft/Office/9/Word" but this key depends on a specific version of office. is there any key , which can be used to know whether office is installed without specifying its version.
Currently the code is trying to create object of word application. but it is taking around 20 secs or more on network. The key upto "Software/Microsoft/Office" is available in registry even if ms office is uninstalled.
So i want a key which is not specific to any version of office and available only if office is installed.
Thank you,
-
Aug 23rd, 2007, 04:38 AM
#2
Re: registry key
possibly hkcr > .doc > content type will return application/msword
i believe that it would return wordpad (or other) if word is not installed
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 23rd, 2007, 10:36 AM
#3
Re: registry key
You can enumerate the keys below "Software/Microsoft/Office" and read into the highest version found. So if it finds kes 8.0, 9.0, 10.0 then you would read contents of 10.0 key looking for the Word subkey.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Aug 24th, 2007, 12:40 AM
#4
Thread Starter
Member
Re: registry key
Thanks for your concern towards my problem. Both suggestion are very effective, but I think i should use westconn1's suggestion which is more suitable than the RobDog888's. I checked the registry and found that the .doc type is associated with word application only if ms office is installed. When the ms office is uninstalled, the version related entry remain there in registry , but the association does not exist with ms word. And also i can minimise the coding to increase efficiency which is the main reason behind all this.
thanks a lot.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|