larryk has asked for the wisdom of the Perl Monks concerning the following question:
Please help me to teach it a lesson. I need to add/replace unformatted text in the message body with nicely coloured text, change fonts/sizes etc.
So far I have (pitiful I know)...
Any help will be most gratefully received,#!perl use strict; use warnings; use Win32::OLE 'in'; use Win32::OLE::Const 'Microsoft Outlook'; my $server = Win32::OLE->GetActiveObject('Outlook.Application'); for my $inspector ( in $server->Inspectors ) { if ( $inspector->CurrentItem->Class != olMail ) { print "not an email, skipping...\n"; next; } elsif ( $inspector->EditorType != olEditorRTF ) { print "not rich text format (RTF), skipping...\n"; next; } else { print "processing...\n"; # here's the body # but i need the textbox or something # and this is as far as i have got $inspector->CurrentItem->Body; } }
larryk perl -le "s,,reverse killer,e,y,rifle,lycra,,print"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Message Editing in Outlook using Win32::OLE
by larryk (Friar) on Oct 05, 2001 at 18:42 UTC | |
by Foggy Bottoms (Monk) on Aug 08, 2003 at 14:27 UTC |