First off, that is a unique and though provoking name.
IMPO, it may be more work than it is worth to go looking in the registry. I agree that typeing 'Excel.Application' is a pain in the back side so here are a couple of UNTESTED alternatives...
# use Constants use constant EXCEL => 'Excel.Application'; use constant WORD => 'Word.Application'; my $excel = Win32::OLE->GetActiveObject(&WORD)
#Use another package package MSApps; { our $MSApps::EXCEL = 'Excel.Application'; our $MSApps::WORD = 'Word.Application'; } ## Then use MSApps; my $excel = Win32::OLE->GetActiveObject($MSApps::EXCEL)
#Do the most simple thing: create variables. my $EXCEL = 'Excel.Application'; my $WORD = 'Word.Application'; my $excel = Win32::OLE->GetActiveObject($WORD)
UpdatE: Eccentric reformating
Kristofer Hoch
Si vos can lego is, vos es super erudio
In reply to Re: Class names in OLE
by krisahoch
in thread Class names in OLE
by Foggy Bottoms
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |