View Single Post
  #2  
Old 04-12-2002, 09: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