Since you are using strict, you will need to declare your variable, $rate with "my" as in:
my $rate;
You say it all fails. Do you get any error messages to help indicate where it is failing? One error that I get is "Does not support a collection" in METHOD/PROPERTYGET", referring to the line:
foreach $rate($Word->ActiveDocument->Selection->{Text}
And also "Can't use an undefined value as a HASH reference". You might start by looking at your syntax in that bit of code.
What is your end-goal for this script?
Have you read the Win32::OLE documentation at ASPN?
In reply to Re: Win32::OLE word questions
by WhiteBird
in thread Win32::OLE word questions
by rootstock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |