?
Solved

Outlook 2010 Public Folder VBA

Posted on 2014-10-30
8
Medium Priority
?
324 Views
Last Modified: 2014-11-26
I'm trying to open a  calendar in a public folder using the code below, however I get an error message:
runtime error: 2147221233 (8004010f) The attempted operation failed. An object could not be found

 Set olkCal = Session.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("Conference Call")

Any Thoughts
0
Comment
Question by:shieldsco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:ReneD100
ID: 40413394
Maybe a typo in the name?
Try to list all the folder names
    Dim olkPub, olkcal As Outlook.Folder
    Set olkPub = Session.GetDefaultFolder(olPublicFoldersAllPublicFolders)
    Dim i As Integer
    For i = 1 To olkPub.Folders.Count
        Set olkcal = olkPub.Folders(i)
        debug.print olkcal.Name
        'or MsgBox olkcal.Name
    Next

Open in new window

0
 

Author Comment

by:shieldsco
ID: 40413465
Its in the shared folder Conference Line
0
 
LVL 5

Expert Comment

by:ReneD100
ID: 40413562
Conference Line or  Conference Call?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:shieldsco
ID: 40413704
Its conference Line and I did change it
0
 
LVL 5

Expert Comment

by:ReneD100
ID: 40413752
Then it should work. You could test it by using the number. First obtain that by changing the print line to:
debug.print i, olkcal.Name

Open in new window

Then you can change your code to (3 used as an example, use the number you found of course:
Set olkCal = Session.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders(3) 

Open in new window


The name should also work, but let's try this first.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 40414868
Is the target folder (i.e. Conference Line) a top level public folder or is it under another folder?
0
 

Author Comment

by:shieldsco
ID: 40415471
under another folder
0
 
LVL 5

Accepted Solution

by:
ReneD100 earned 2000 total points
ID: 40415477
If it's under another folder you'll have to include that as well:
Set olkCal = Session.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("OtherFolder") .Folders("Conference Line")

Open in new window

0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
New style of hardware planning for Microsoft Exchange server.
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

764 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