Outlook에서 폴더를 추가 할 수 있지만이를 이동하는 방법은 없습니다. 당신이 인기 아웃룩 보너스 라이브러리를 사용하는 경우Win32 :: OLE를 사용하여 Outlook 폴더를 이동할 수 있습니까?
#!/usr/bin/perl
use strict;
use warnings;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Outlook';
# use existing instance if Outlook is already running, or launch a new one
my $Outlook;
eval {$Outlook = Win32::OLE->GetActiveObject('Outlook.Application')};
die "Outlook not installed" if [email protected];
unless (defined $Outlook) {
$Outlook = Win32::OLE->new('Outlook.Application', sub {$_[0]->Quit;})
or die "Oops, cannot start Outlook";
}
my $namespace = $Outlook->GetNamespace("MAPI");
#my $Folder = $namespace->Folders("backupadmin")->Folders(
# "Inbox")->Folders->Add("test");
my $Folder = $namespace->Folders("backupadmin")->Folders(
"Inbox")->Folders("test")->MoveTo("test1");
아웃룩 VB 네임 스페이스가 꽤 아슬 아슬 보이는; 폴더의 이름을 바꾸거나 다시 부모를 바꾸는 것이 목표입니까? 목표가 이름 짓는 것이라면,'...-> Folders ("test") -> Name = "test1"'과 같은 것 (또는'setName'과 같은 적절한 구문을 사용하는 비슷한 것)이 가능할 수 있습니다. [참조 이름 바꾸기] (http://www.pcreview.co.uk/forums/rename-folder-outlook-inbox-t3031265.html) – abiessu
더 정확하게'my $ Folder = $ namespace-> Folders ("backupadmin") > ("Inbox") -> 폴더 ("test") -> { "Name"} = "test1";'(다시 폴더의 이름을 바꾼다고 가정하고, ...-> Folders ("test") -> SetProperty ('Name', "test1")' – abiessu
이 같은 이름 바꾸기가 적용되면 다른 새로 고침이 있어야한다는 의견이 있습니다. 결과도 참조하십시오. – abiessu