OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-12-2002, 15:52
reanan
Guest
 
Posts: n/a
Default Detect if VBA is installed (an answer and a question)

Something to think about

I want to know if someone who installs a script of mine has VBA for CorelDRAW 10 or CorelDRAW 11 installed. If this is so I can install a VBA solution if not I install a CorelSCRIPT solution (second choice because VBA has lot’s more possibilities). What I do now is look for the file “DRAW10VBA.HLP” or “DRAW11VBA.HLP” in the CorelDRAW directory “Programs”. I found out that this is the only file (at least that I could find) that will never be installed when during setup the VBA option is not checked or when someone installs a Try/Buy or an education license.
This seems a little bit unprofessionally to me but I really can’t find where CorelDRAW 10 stores the information that VBA is installed. In CorelDRAW 11 is a setting that shows you that VBA is installed:

HKEY_LOCAL_MACHINE\SOFTWARE\Corel\CorelDRAW\11.0\EN\Features
VBAProgramFiles = installed


But here is the problem the “EN” part, this stands for the English version of CorelDRAW 11 but what is the key for the Dutch, the French etc. version and how to detect which version is installed?
There is a key which looks to me to be the one:

HKEY_LOCAL_MACHINE\SOFTWARE\Corel\CorelDRAW\11.0
Language = EN


But is this failsafe?

If anyone has a better way of detecting if VBA for CorelDRAW 10 or CorelDRAW 11 is installed during a setup then post it here!
Reply With Quote
  #2  
Old 04-12-2002, 10:41
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Detect if VBA is installed (an answer and a question)

René,

Frankly this is not the best approach. VBA is a shared tool and it may be installed if, say, you have Microsoft Office installed, but may not be available to CorelDRAW. VBA comes in several versions which are not compatible among themselves. CorelDRAW 10 ships with VBA 6.2. CorelDRAW 11 comes with VBA 6.3. You cannot interchange the two, so even if you have Draw 10 with VBA installed but Draw 11 without, your macro for Draw 11 will not work and just detecting if VBA is installed will not help.

Personally, I check for a proper APC layer installed. It is different for each version of VBA installed. So, I check if the following registry keys are present:

Draw 10 (VBA 6.2):
Code:
HKEY_CLASSES_ROOT\CLSID\{CB472525-5C11-11D3-A6B5-00105AC594F0}
Draw 11 (VBA 6.3):
Code:
HKEY_CLASSES_ROOT\CLSID\{8F0D99C5-14DB-48B0-8674-12996627496E}
This is also not completely bullet proof, but it is more reliable.
Reply With Quote
  #3  
Old 04-12-2002, 14:21
reanan
Guest
 
Posts: n/a
Default

Alex,

Where do you get this information (rhetorical question)? I will try to implement this in my setups and thanks once again for your fast and useful response!
Reply With Quote
  #4  
Old 04-12-2002, 15:35
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Quote:
Originally Posted by reanan
Where do you get this information (rhetorical question)?
Well, RegMon usually helps in these situations.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie question but hopefully easy to answer. cutter CorelDRAW/Corel DESIGNER VBA 0 05-11-2003 12:30


All times are GMT -5. The time now is 19:26.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com