Solved

Importing directly into Calendar????

Posted on 2001-06-21
2
202 Views
Last Modified: 2010-04-08
Is it possible to import data from Access database directly into an Outlook 2000 Calendar using VBA???  I can import into a newly created Calendar, but do not appear to be able to import into the Default Calendar.  If it is possible how do I reference it?  Here is the code I use to create a new Calendar:

strFolder = "Calendar from Access"
Set fld = nms.Folders("Mailbox - User1").Folders.add(strFolder, olFolderCalendar)

Can anyone help me modify this so that it imports into the standard Calendar?
0
Comment
Question by:mercia
2 Comments
 
LVL 9

Accepted Solution

by:
rjcpjc earned 100 total points
ID: 6215159
mercia (I hope you don't think I forgot about you).  Its been busy at my office.  

Anyway, here is the code to reference the default calendar and I'm going back to your other question about the find folder sub in just a minute.  

Set fld = nms.GetDefaultFolder(olFolderCalendar)


This is assuming that you have a valid namespace object (nms).  If this doesn't work for you let me know.  The other way to do it is to use the nms.GetSharedDefaultFolder method if you want to get another user's calendar (other than the profile you are using to log into Outlook on the machine the VBA code is running on).  

Now back to your other question with apologies that it took so long.  

--Patricia
0
 

Author Comment

by:mercia
ID: 6217947
Thanks I nearly had it I was trying DefaultFolder(olCalendar) hence why it did not work.  Now I can move on to my next problem!  Cheers

Wayne
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now