oedocs |
Outlook & Exchange - programming
intro | home - top of the page - email |
- http://www.cdolive.com/code.htm
- CDO Live - Code Sample Library (
http://www.cdolive.com/mbxreport.htm )
- http://msdn.microsoft.com/library/default.asp?URL=/library/techart/outlookanchor.htm
- Outlook Technical articles
- http://search.support.microsoft.com/kb/c.asp
- Microsoft Knowledge Base
- http://support.microsoft.com/support
- Microsoft Support Web site
- http://www.microsoft.com/office/developer
- Microsoft Office Developer Support Web site
- http://msdn.microsoft.com
- Microsoft Developer Network
- http://mspress.microsoft.com
- Microsoft Press
- http://support.microsoft.com/support/news
- Public Internet newsgroups
- http://exchange.devx.com/ - Exchange
& Outlook magazine
codes1 | home - top of the page - email |
Getting information from Contacts folder localy:
use strict;
use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; # or 'Microsoft Outlook 9.0 Object Library'; # Const module defines many usefule constants - like olFolderContacts , etc. my $Outlook = Win32::OLE->GetActiveObject('
Outlook.Application') or die "oops 1";
# my $NewFolder = $Folder->Folders->Add("test_folder"); my $contacts = $Folder->{Items};
# print '-'x50,"\n";
my $con
print "\nAnother way to iterate\n\n"; $con=$contacts->GetFirst(); print "$con->{FullName}\n";
|
List Address Lists available in your Outlook:
use strict;
use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $Outlook = Win32::OLE->GetActiveObject('Outlook.Application')
my $namespace = $Outlook->GetNamespace("MAPI");
print "$ii = $name\n";
|
print information about members of a mailing list:
use strict;
use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $Outlook = Win32::OLE->GetActiveObject(' Outlook.Application')
|
Use CDO to connect to Exchange
and get the number of contacts
from other people's folders:
use strict;
use Win32::OLE; use Win32::OLE::Variant; use Win32::OLE::Const; my $DEBUG_FLAG = 1; # set it to zero for real job
# Necessary for MAPI component
# Do this rather than 'use' as that interferes with the OLE Initialize
code
my $MAPI = Win32::OLE->new('MAPI.Session');
my %LogonParms = ( 'ProfileInfo' => "$server\n$fname.$lname" ); $MAPI->logon(\%LogonParms);
my $Filter = $GAL->Filter(); $Filter->{Name} = $mailing_list_name; # "gs-emaildev"; my $DL = $GAL->GetFirst(); # Assumes unique match to above filter
for ( my $Member = $Members->GetFirst();
exit;
# ------------------------------------------------------------
my $MAPI = Win32::OLE->new('MAPI.Session');
my %LogonParms = ( 'ProfileInfo' => "gsnb01e\n$Account"
);
my $Contacts = $MAPI->GetFolder(
|
use strict;
use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; use Win32::OLE::Variant; my $Outlook = Win32::OLE->new('Outlook.Application', 'Quit');
# my $NewFolder = $Folder->Folders->Add("test_folder"); my $contacts = $Folder->{Items};
my $con;
__END__
1 - TestContact1
|