An attempt operation failed. An object could not be found at line5.

running this code in default "this outlook session",getting an error at line5 saying object not foun

  • Urgent requirement

    Votes: 0 0.0%
  • Need quick help about this

    Votes: 0 0.0%

  • Total voters
    0
Status
Not open for further replies.

jahnavi

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Private WithEvents Items As Outlook.Items
Private Sub Application_Startup()
Dim Ns As Outlook.NameSpace
Set Ns = Application.GetNamespace("MAPI")
Set Items = Session.GetDefaultFolder(olFolderCalendar).Parent.Folders("abc").Items
End Sub
Private Sub Items_ItemAdd(ByVal Item As Object)
'On Error Resume Next
If Item.Class = olAppointment Then
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)
objMsg.To = "abc@mail.com"
objMsg.Subject = Item.Subject
objMsg.Body = "New appointment added to Calendar" & _
vbCrLf & "Subject: " & Item.Subject & _
vbCrLf & "Date and time: " & Item.Start
'use Display instead of Send if you want to add a note before sending
objMsg.Send
Set objMsg = Nothing
End If
End Sub
End Sub
 
I am trying to run this code in macros, outlook 2010 to get an email update when there is a change in calendar appointement
 
where is the abc calendar folder?
the parent here:
Session.GetDefaultFolder(olFolderCalendar).Parent.Folders("abc").Items
says its at the same level as the inbox and default calendar

if its a subfolder of calendar you need to remove parent.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
V Outlook Error The Attempted operation Failed. An Object Could Not be found Outlook VBA and Custom Forms 0
D Outlook 2016 Outlook Error Msg "The operation cannot be performed ..." How to Stop it Using Outlook 4
Cdub27 Your changes to this item couldn't be saved because Server Denied Operation (HTTP 403 Forbidden) Using Outlook 1
Diane Poremsky Could not complete the operation. One or more parameter values are not valid. Using Outlook 0
M Very slow operation Using Outlook 0
S The attempted operation failed ... 2nd time running code Outlook VBA and Custom Forms 3
Christiaan Could not complete operation because the service provider does not support it Using Outlook 2
Diane Poremsky This operation has been cancelled due to restrictions Using Outlook 0
S Outlook 2010 I am getting error code 0x8DE00006 'the operation failed'. outlook 2010 send/receive progress Using Outlook.com accounts in Outlook 2
H Outlook 2010, "The Operation Failed" Sending emails Using Outlook 4
S Microsoft office Cannot complete operation error Outlook VBA and Custom Forms 1
J New Outlook 2007 form - try to send and get error Operation Failed Outlook VBA and Custom Forms 11
S Outlook 2013. Adding office 365 email account causes 'The operation failed' Using Outlook 2
M Outlook 2010 Calendar error Operation Failed Using Outlook 6
S Unknown error and The operation failed Using Outlook 1
S The operation failed error while send email to other domain. Using Outlook 1
R "The Operation Failed. The messaging interfaces have returned an unknown error Exchange Server Administration 3
B Task List in To-Do Bar 'The operation failed. An object could not be found' Using Outlook 3
N Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) Outlook VBA and Custom Forms 1
M Cannot Send - "Operation failed. An object cannot be found" BCM (Business Contact Manager) 4
D Outlook 2007: "the Operation Failed" on Send to Multiple addresses Using Outlook 6
L Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) Outlook VBA and Custom Forms 1
J The operation failed. Outlook VBA and Custom Forms 17
W Save Operation Failed error Outlook VBA and Custom Forms 7
Mark Foley The upload of "Calendar" failed. There was a problem with the request. Using Outlook 6
P Mail delivery failed returning message to sender Using Outlook 1
F 'General failure (URL) Server execution failed' Using Outlook 1
Xueying run a script in rules, first time succeed, failed afterwards Outlook VBA and Custom Forms 3
wallisellener database creation failed BCM (Business Contact Manager) 0
R catalog Content Index failed-Unable to mount database.(hr=0x80004005,ec=-501) Exchange Server Administration 0
J Synchronization of some deletions failed [0-130] Exchange Server Administration 6
M Synchronization of some deletions failed [0-130] Using Outlook 3
P Sync Center appointments failed to synchronize Using Outlook 1
S COM Addin Failed to load in Outlook 2003 Outlook VBA and Custom Forms 1
S Failed to install Business Conctact Manager 2007 BCM (Business Contact Manager) 1
R RE: Business Contact manager failed to install BCM (Business Contact Manager) 1
A Creating Redemption.MAPIUtils failed with Windows 7 x64 Outlook VBA and Custom Forms 5
S Failed to create an RDO session instance: Class not registered Outlook VBA and Custom Forms 1
R SQL Server Setup failed - Please help?! BCM (Business Contact Manager) 2
H Failed install BCM (Business Contact Manager) 2
L Exchange Management Console - Initializtion failed on Logon Failure: unknown username or bad passwor Exchange Server Administration 4
P Setup failed to install Business Contact Manager for Outlook 2007 BCM (Business Contact Manager) 2
E Re:BCM failed to install in outlook 2007 due to SQL Server Express 20 BCM (Business Contact Manager) 1
T Re: Setup failed to install Business Contact Manager BCM (Business Contact Manager) 1
B Re: BCM failed to initialize the common language runtime BCM (Business Contact Manager) 4
E Connecting to database failed BCM (Business Contact Manager) 3

Similar threads

Back
Top