in reply to Re^4: InsertSymbol usage to modify Word document
in thread InsertSymbol usage to modify Word document
I'd check the return values of the methods you're invoking, and perhaps scatter a few Win32::OLE->LastError around, to see what it's doing. (Error Handling (COM) may or may not help here.)
I agree, ReplacementText is probably a mistake. Do you want to remove the "!" ? The MoveRight later on appears to be to step past it ?
But, as brother Corion says, the main issue is probably that:
should be written:$selection->MoveRight ( Unit => wdCharacter, Count => 1);
and similarly everywhere you are using "named arguments".$selection->MoveRight ( { Unit => wdCharacter, Count => 1 } );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: InsertSymbol usage to modify Word document
by merrymonk (Hermit) on Jan 02, 2009 at 13:26 UTC |