in reply to Class names in OLE
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Class names in OLE
by Foggy Bottoms (Monk) on Jun 17, 2003 at 13:29 UTC | |
|
Re: Re: Class names in OLE
by krisahoch (Deacon) on Jun 17, 2003 at 17:54 UTC |