Hi
I need a little beat of assistance.
I have troubles with copying files from hard drive to Public Folders
in Outlook.
I copy files from hard drive to Inbox folder using the following
script :
use strict;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Outlook';
$|++;
$Win32::OLE::Warn = 3; # Throw Errors, I'll catch them
my $OL = Win32::OLE->GetActiveObject('Outlook.Application')
|| Win32::OLE->new('Outlook.Application', 'Quit');
my $file = $OL -> CopyFile("D:/Apollo/test.txt", "Inbox");
this code works well
Now I want to copy form disk D: to Public folder:
use strict;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Outlook';
$|++;
$Win32::OLE::Warn = 3; # Throw Errors, I'll catch them
my $OL = Win32::OLE->GetActiveObject('Outlook.Application')
|| Win32::OLE->new('Outlook.Application', 'Quit');
my $file = $OL -> CopyFile("D:/Apollo/test.txt", "//Public Folders/Favorites/Apollo");
this code doesn't work
the following error appear:
D:\Apollo>folder.pl
OLE exception from "Microsoft Outlook":
Could not complete the operation. One or more parameter values are not
valid.
Win32::OLE(0.1502) error 0x80070057: "The parameter is incorrect"
in METHOD/PROPERTYGET "CopyFile" at D:\Apollo\folder.pl line 10
When I use VBA to perform the same action all works well :
Sub Copy()
Dim olApp As Application
Dim docWebpg As Object
Set olApp = Outlook.Application
Set docWebpg = olApp.CopyFile("D:\Apollo\test.txt", "\\Public
Folders\Favorites\Apollo")
End Sub
Where can the problem be ?
-------------------------------------------------------------------------------
http://www.one.lv - Tavs mobilais e-pasts!
Tagad lasi savu e-pastu ar mobilo telefonu - wap.one.lv!
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs