Solved

Importing directly into Calendar????

Posted on 2001-06-21
2
201 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

708 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

19 Experts available now in Live!

Get 1:1 Help Now