I have started working with Win32::OLE, and it has been fun.
But now I need Perl to access public calendars, and I've run into problems. I can make Perl access my default calendar, but not the public calendars. We are using an Exchange server. This question seems to pop up every now and then, but I haven't seen any solutions. There are some great Perl & Outlook scripts here, but none (that I've seen) address Outlook public calendars. One monk posted a
Calendar parsing program wherein he wrote:
#open the default Calendar and grab the items in the calendar (twice..
+.)
my $namespace = $outlook->GetNameSpace("MAPI") or die "can't open MAPI
+ namespace\n";
my $recurringitems = $namespace->GetDefaultFolder(olFolderCalendar)->{
+Items};
my $calitems = $namespace->GetDefaultFolder(olFolderCalendar)->{Items}
+;
My first idea was to change GetDefaultFolder to GetPublicFolder. Then I provided the address of the public folder as a string (I was guessing here), so we end up with:
my $recurringitems = $namespace->GetPublicFolder("\\Path\to
folder")->{Items};
my $calitems = $namespace->GetPublicFolder("\\Path\to\folder")->{Items
+};
But this didn't work at all. I have full permissions for these public folders. I looked at Microsoft's documentation and came away with the feeling that I am going in the wrong direction. Any ideas would be appreciated.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.