Article View: borland.public.cppbuilder.nativeapi
Article #13522Accessing Outlook
From: FrankW
Date: Wed, 08 Oct 2003 01:45
Date: Wed, 08 Oct 2003 01:45
24 lines
1500 bytes
1500 bytes
Hi,
Sorry if this is a little off topic, I can't find an oleAutomation newsgroup
for C++ Builder. Following is code that access Outlook in BCB4:
Variant NS, App, Folder;
Function GetNamespace("GetNamespace"),
GetDefaultFolder("GetDefaultFolder"),
Procedure Logon("Logon");
CoInitialize(NULL);
App = CreateOleObject("Outlook.Application");
NS = App.Exec(GetNamespace << "MAPI");
NS.Exec(Logon);
Folder = NS.Exec(GetDefaultFolder << 10); // 10 is default contact
folder
How to access to a non default folder?
Thanks,
Frank
Technical Details
Message-ID:
<3f836c55@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,eafac6ecb0577e4c,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-07 19:09:46 PST Reply-To: "FrankW" <nospam@nospam.com> From: "FrankW" <nospam@nospam.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Accessing Outlook Date: Wed, 8 Oct 2003 09:45:31 +0800 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 x-mimeole: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 203.131.165.53 Message-ID: <3f836c55@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1065577557 203.131.165.53 (7 Oct 2003 18:45:57 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail