Similar Threads:
1.Hyperlink in Outlook mail not openning in browser
I am using Outlook 2007 and for the pass two days when clicking on a
hyperlink within a mail instead of openning the link in a browser window I
get the warning ' This operation has been canceled due to restrictions in
effect on this computer. Please contact your system administrator'. The
computer only has one user me and I do all the settings and I don't think I
have made any changes. Visa, Office2007 and IE8 Beta. Anyone got any ideas?
--
Thanks
2.when i click on a hyperlink in outlook mail, picasa install screen pops up
whenever i click on a hyper link in an open e-mail (I use Outlook) it
results in the intall screen for picasa coming up. I have tried 'x-ing'
out and retrying the link, i just get picasa again. i've tried deleting
picasa's install part of its package, it still comes up. the same for
shutting down and rebooting after doing these actions, i still cannot
access hyperlinks, just the install screen for picasa, i even tried
reinstalling picasa, but no dice, it still wants to reinstall itself
when i click on an e-mail hyperlink. hyperlinks in explorer act
normally. any ideas on how i could fix this, i'm stumped. thanks, jan
3.Sending hyperlinks with Outlook mail
I have made an access application for documentation management within the
projects at the company I work for. The project team members have access to
this database and register all incoming and outgoing communication and
documentation in this database. To inform other team members of new
documents, faxes, letters etc. I have included a "Distribute" command button
on the registration form with which an e-mail is made (SendObject method). In
this mail access will paste a hyperlink to the document. User only has to
enter names to which document has to be distributed. Problem I have is that
access generates a mail in "plain text" format. Long hyperlinks are than
wrapped in this message and link is no longer working. When message is in
"rich text" format this problem does not occur. Is there a way to force
access to open a mail message in "rich text" format ? Note: In our office
Outlook is configured to open new mail messages in "rich text" format.
Obviously access overules this setting. Thanks, Theo
4.Accessing Outlook mail via Mail::Outlook
Greeting.
I am trying to create a script that will search a user's outlook email and move any messages that mtahc a certain subject to a new folder. To accomplish this I found the Mail::Outlook module on CPAN that allows me to easily access the OLE Outlook calls via Win32::Ole.
My problem is this, the Mail::Outlook module does not have a specific method to move an email from one mailbox to another. I can display the email when my match occurs, but I cannot figure out how to move it.
Here is an example of my code that works just find to pop-up an display any messages in my mailbox that match :
use Mail::Outlook;
use strict;
# Open filehandle to Remedy report file
open (_TICKETS,'C:\TicketCounts\MyOpen.rep') or die "Cannot open C:\TicketCounts\MyOpen.rep : $!";
# Iterate through each line of the file
print "Obtaining list of open tickets from $remedyReportFile .... ";
while (<_TICKETS>){
# Add ticket number to array in csv format
push @myTickets, "$1" if m/CallT0000(\d+)/;
}
print " Ok.\n";
# Open an Outlook OLE connection
print "Opening connection to Outlook .... ";
my $outlook = new Mail::Outlook('') or die "Cannot create mail object\n";
# Change to the Support mail folder
my $folder = $outlook->folder('Inbox/Support') or die "Cannot create folder object\n";
# Read the 1st message
print " Ok.\n";
print "Searching messages for call ticket match .... " unless defined $bodyMatchString;
print "Searching messages for subject containing: call ticket matches and body containing: $bodyMatchString ... " if defined $bodyMatchString;
my $message = $folder->first();
# Iternate all messages in the folder
while ($message) {
# Strip the call ticket number out of the subject
my $callTicketNumber=$1 if $message->Subject() =~ m/CallT0000(\d+) /;
# If a call ticket number was found, compare against the user's open call tickets
if (defined $callTicketNumber) {
if ( (grep /$callTicketNumber/, @myTickets) ) {
$emailMatches++;
$message->Display;
}
}
}
Now, I want to change the $message->Display to a move operation. Searching the available OLE/COM Objects for Outlook via Microsoft's OLE/COM Viewer, I see that there is a move method for the mailItem CO class:
[id(0x0000f034), helpcontext(0x004de8b9)]
IDispatch* Move([in] MAPIFolder* DestFldr);
I tried editing the Outlook::Mesage.pm file (that stores the message display call) to add a call to this OLE method.
The 1st thing I did was to see if I could simply add a new su b to the PM file called moveMessage that in actually would simply display the messag the same way the display sub did:
sub moveMessage {
my ($self,%hash) = @_;
# pre-populate the fields, if hash
foreach my $field (@autosubs) {
$self->{$field} = $hash{$field} if($hash{$field});
}
# we need a basic message fields
return 0 unless($self->{To} && $self->{Subject} && $self->{Body});
# Build the message
$self->{message}->{To} = $self->{To};
$self->{message}->{Cc} = $self->{Cc} if($self->{Cc});
$self->{message}->{Bcc} = $self->{Bcc} if($self->{Bcc});
$self->{message}->{Subject} = $self->{Subject};
$self->{message}->{Body} = $self->{Body};
# Send the email
$self->{message}->Display();
return 1;
}
I thought this would be an easy 1st step, but come to find out, I am getting teh following error when I run this:
retrying default method at E:/Perl/site/lib/Win32/OLE/Lite.pm line 157, <_TICKETS> line 9.
Win32::OLE(0.1403) error 0x8002000e: "Invalid number of parameters"
in METHOD/PROPERTYGET "" at H:\outlook2.pl line 45
Now, I must confess that I am new to OLE and have limited exposure to Object Orientation. Can anyone point me in the right direction or show me some sample code that will move a message from one mailbox to another?
I have searched extensively for any existing code to do this, but all I have found are very limited and do not come close to accomplishing my goal.
I appreciate any help.
Thanks!
Jason
5.Sending mail through Mail::Outlook
Hi,
I am using Mail::Outlook to send email through Outlook. I've set out
the code below. Everything works fine but I have two items on my wish
list.
1. To be able to send attachments. I have tried
'$message->Attachments('c:\file.txt');' and
'$message->Attachments.Add('c:\file.txt');' but neither work.
2. To be able to send the email in html format but
'$message->HTMLBody($body);' doesn't work.
Are either of these possible using Mail::Outlook or do I need to go
back to scratch and use another module?
Thanks
Paddy
#################################################################################
# CODE
#!/usr/bin/perl
use strict;
use warnings;
use Mail::Outlook;
use Win32::OLE::Const 'Microsoft Outlook';
my $outlook = new Mail::Outlook();
my $to = "my_mom\@moms_mail.com";
my $body = "Hi Mom!\n\n etc.";
my $message = $outlook->create();
$message->To($to);
$message->Cc();
$message->Bcc();
$message->Subject('Happy Mothers Day, Mom!);
$message->Body($body);
#$message->HTMLBody($body);
#$message->Attachments('c:\Card.pdf');
$message->send;
6. Outlook 2007 sent mail now showing properly in other mail clients
7. Desperate for help with Outlook 2003 (mail to hyperlink opens mutiple browsers)
8. outlook 2002, hyperlinks in e-mail