A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Operation Failed, object could be not be found - Can't find the fo



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old March 21st 07, 12:50 AM posted to microsoft.public.outlook.program_vba
AirDuster101
external usenet poster
 
Posts: 3
Default Operation Failed, object could be not be found - Can't find th

Hi,

This is a folder with notes. For some unknown reasons, it contains several
objects and files inside but "is NOT" a outlook folder. I got workaround, I
added the calendar to everyone's Favorites folder and access it from there
instead.

Thanks

AD

"Michael Bauer [MVP - Outlook]" wrote:



It seems that the folder '*Education Calendar' doesn't exist. Are you sure
the folder name really starts with '*'?

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Thu, 15 Mar 2007 21:48:00 -0700 schrieb AirDuster101:

Hi,

I am using outlook2003 and Exchange Server. I am trying to locate a

calendar
name "*Education Calendar" in a public folder.

The path is "Public Folders\All Public Folders\EDUCATION\*Education
Calendar".

I've found the below script on Sue Mosher's site, but it can never find

the
subfolder "EDUCATION". The object always returns "Nothing"... I don't know
why? Please help! I also tried in mixed case "Education". Same error.

Thanks


================================================== ===========
Dim objFolder As Outlook.MAPIFolder
Set objFolder = GetFolder("Public Folders/All Public
Folders/Education/*Education Calendar")

Public Function GetFolder(strFolderPath As String)As MAPIFolder
' folder path needs to be something like
' "Public Folders\All Public Folders\Company\Sales"
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colFolders As Outlook.Folders
Dim objFolder As Outlook.MAPIFolder
Dim arrFolders() As String
Dim I As Long
On Error Resume Next

strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders() = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If

Set GetFolder = objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function


Isabelle


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
operation failed and object could not be found Sabu Outlook - Calandaring 0 September 10th 06 11:18 PM
The operation failed. An object could not be found. [email protected] Outlook and VBA 3 February 16th 06 01:16 AM
Operation Failed. An object could not be found Raymon Outlook - Installation 0 January 21st 06 03:26 AM
operation failed - object could not be found Lynne Outlook - Installation 1 January 20th 06 04:01 PM
the operation failed. the object could not be found. ChandleyCrawford Outlook - Installation 0 January 12th 06 10:05 PM


All times are GMT +1. The time now is 02:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.