n00b question here.
I am an MS-Office 2007 user, and am using Win32::OLE. I have an outlook email in HTML format as specified here:
#start Outlook and make it visible
my $Outlook = Win32::OLE->GetActiveObject
('Outlook.Application') ||
Win32::OLE->new('Outlook.Application');
$Outlook->{'Visible'} = 1;
my $message = $Outlook->CreateItem(olMailItem);
$message->{BodyFormat} = 'olFormatHTML'; #needed for rich format
#use a hash to populate address and subject fields
$message->{HTMLBody} = $emailBody;
my $clip = Win32::Clipboard($message->{HTMLBody});
If I manually copy and paste my email body from Outlook to Word, it copies fine, resulting in RTF in Word.
Programatically though (see code snippet above), it seems to be copying straight HTML code to the clipboard. Then when pasted to Word, it comes out as HTML code, not the RTF I desire. How can i programatically copy and paste from the Outlook email body to Word so that it ends up as rich text?