Outlook 2010 Public Folder VBA

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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Open in new window

shieldscoAuthor Commented:
Its in the shared folder Conference Line
Conference Line or  Conference Call?
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

shieldscoAuthor Commented:
Its conference Line and I did change it
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.
David LeeCommented:
Is the target folder (i.e. Conference Line) a top level public folder or is it under another folder?
shieldscoAuthor Commented:
under another folder
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.