Solved

Outlook 2010 Public Folder VBA

Posted on 2014-10-30
8
301 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
  • 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
 

Author Comment

by:shieldsco
ID: 40413704
Its conference Line and I did change it
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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 500 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Archiving O365 / Outlook 2013 4 33
Can an Outlook meeting invitation be accepted/recorded by someone with a Gmail calendar 4 29
Moved to Outlook 2013 4 35
exchange 2013 4 42
If you don't know how to downgrade, my instructions below should be helpful.
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

911 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

23 Experts available now in Live!

Get 1:1 Help Now