Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Creating entries in an Outlook Calendar

by lumina (Novice)
on Apr 19, 2002 at 20:35 UTC ( #160660=perlquestion: print w/replies, xml ) Need Help??

lumina has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to develop a script to copy calendar entries from the default Outlook Calendar folder to another Calendar folder. So far I have found a script to extract the entries from the defualt calendar which I have got working. Has anyone managed to write entries away to the new calendar folder, or tried anything similar?
  • Comment on Creating entries in an Outlook Calendar

Replies are listed 'Best First'.
Re: Creating entries in an Outlook Calendar
by Moonie (Friar) on Apr 19, 2002 at 21:15 UTC
    This node (Perl with Outlook Calendar) may help.. but as the monk before me mentioned.. posting your code will definately help us help you.

    - Moon
      Thanks for your reply, I appreciate the positive comments which have been posted.
      It was in fact the node you refer to, 110503 which got me started.
      The issue is that in our office we use Outlook 2000 and Exchange 2000 and we mainly have laptops.
      We also have internet dial up accounts for external e-mails and working offsite.
      This means that in Outlook, there are two sets of all the standard folders, inbox, outbox, calendar, drafts etc etc.
      One set of folders is under an Outlook Today - Personal Folder, and therefore in a .pst file,
      this is the default for all calendar entries. The others are under the Exchange mailbox.
      I am trying to build a script which will copy all the calendar entries from the .pst file and place them into the Exchange Mailbox Calendar folder.
      I have used the script posted in the node referenced, and it is working perfectly. So I know that I can extract the entries OK.
      I am stuck on how to "reverse" the script so that I can write the entires into the Exchange Mailbox Calendar.
      whilst this bit of code in the routine specifies the default outlook calendar folder, how can I specify the Exchange folder?
      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} +;
      I have tried looking in the Outlook Object Model, but it just didn't make sense to me.

      Any help, or nudges in the right direction would be most helpful!

        Why don't you enumerate the items in the 'Folders' collection? Each of those is a folder with its own items. See OL2000: Programming Examples for Referencing Items and Folders in Microsoft's knowledge base for more on this.

        Good question, though.

        dmm

        If you GIVE a man a fish you feed him for a day
        But,
        TEACH him to fish and you feed him for a lifetime
Re: Creating entries in an Outlook Calendar
by JayBonci (Curate) on Apr 19, 2002 at 21:07 UTC
    Hey there lumina. It would be good if you could post a more specific explanation of what you are trying to do. You have an Outlook calendar, and you would like to migrate the items over to another calendar with a script. Are you:
    • a) Parsing the disk files directly, and reading the info out of that
    • b) Using some sort of COM object or other accessor to retrieve this information from the local machine
    • c) Using MAPI and COM to retrieve this from an Exchange server store?
    Posting some code as to how you got started with this (specifically the part where you access the calendar), would be helpful to someone trying answering your question.

        --jb

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://160660]
Approved by jlk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2023-11-28 22:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?