Integrate Excel and Outlook

R

ryguy7272

I am trying, in vain, to find a way to set appointments to our firm’s Public
‘Office Calendar’. I used the code from this URL:

http://www.dicks-clicks.com/excel/olCalendar.htm

It worked great for adding appointments to my personal calendar, but when I
try to reference the firm’s Public Office Calendar, I fail.

From the ‘Properties’, I know the mapping is like this:
\\Public Folders\All Public Folders

Does anyone know how to get Excel to post an appointment to the Public
Folders or maybe it is called the Public Calendar? A search on the Excel
programming DG did not yield many results for my dilemma…although this was
interesting:
http://www.microsoft.com/office/com...=en-us-excel&lang=en&cr=US&sloc=en-us&m=1&p=1



TIA,
Ryan---
 
S

Sue Mosher [MVP-Outlook]

To create a new item in a non-default folder programmatically, use the Add method on the target folder's Items collection:

Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName")

The message class parameter is optional.

To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the target MAPIFolder. Otherwise, you can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string. For a variation especially for public folders, http://www.outlookcode.com/codedetail.aspx?id=1164
 
R

ryguy7272

Thanks for the look Sue. I tried this snippet of code. It looks like it
should work, but it still does not work for me. A right-click on the public
calendar reveals language such as “when posting to this folder, use
IPM.Appointmentâ€. This seems to be in sync with what you gave me. My
supervisor said there may be some kind of limited access to the public
calendar, but I think that logic is inherently flawed. Do you have any other
ideas Sue? I may just try to Google this thing a little more…

Thanks so much,
Ryan---
 
S

Sue Mosher [MVP-Outlook]

What specifically does not work? Do you get any errors when you step through your code line-by-line? Can you create items in that folder manually? If not, you won't be able to create them programmatically either. Contact the folder owner to ask about getting permission.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
R

ryguy7272

Yes, I can create items in that folder manually. Sometimes Outlook acts
bizarre, like it won’t even allow me to set my available references to the
Outlook Object Library when I am in the VBE in Excel. I may eventually try
to uninstall Outlook and reinstall it. I’ve seen the code work on other
computers in the office, but not on my own computer, so I am thinking that
maybe it is a registry issue. I may play with it a little more in my spare
time, but overall this has become a low priority for me right now.
Nevertheless, thanks for the help Sue!!

Regards,
Ryan---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top