Object could not be found Error in Outlook 2007

Status
Not open for further replies.

vodkasoda

Member
Outlook version
Outlook 2007
Email Account
POP3
I hope somebody can help me here ... to cut a long story short, I have had these VBA programs working for years but always run into problems when changing Outlook versions or Windows versions, I normally fix them reasonably quickly but I can't figure out what's wrong this time !!!

It may be the Outlook structure, or it may be something else, the truth is it is many years since I wrote it and absolutely ages since I last even looked at VBA code !!!

I am using the latest version of Windows 10 and Office Professional 2007.

This is the structure of my Outlook (ScreenHunter 63.png) ... and the relevant bits of code ... (ScreenHunter 64.png, ScreenHunter 65.png & ScreenHunter 66.png) ...

Then it crashes with the error in attachment ScreenHunter 67.png

It is surely something simple, but I just can't get my head around it, probably my age, but obviously not helped by not regularly programming :( !!!

Hopefully somebody can tell me what I need to change :)
 

Attachments

  • ScreenHunter 63.png
    ScreenHunter 63.png
    17 KB · Views: 692
  • ScreenHunter 66.png
    ScreenHunter 66.png
    11.2 KB · Views: 293
  • ScreenHunter 65.png
    ScreenHunter 65.png
    3.8 KB · Views: 298
  • ScreenHunter 64.png
    ScreenHunter 64.png
    14.6 KB · Views: 304
  • ScreenHunter 67.png
    ScreenHunter 67.png
    20.9 KB · Views: 282

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
The windows version won't affect the code - and for the most part, if code works in 2007, it works in newer versions of Outlook (which doesn't affect you currently).

It says it can't find the object... i'm assuming it was the outlook item its processing. Was the item being processed an email message? NRDs, meeting requests, etc can cause macros to fail with similar errors.
 

vodkasoda

Member
Outlook version
Outlook 2007
Email Account
POP3
Hi Diane, thanks for replying, yes, this program basically is my own Outlook Rules program ...
 

vodkasoda

Member
Outlook version
Outlook 2007
Email Account
POP3
I get an enormous amount of E:Mails regarding a football game that I play and this program recognises those E:Mails and places them in specific Outlook Folders. I have a Folder called Kickabout (the name of the game) and a number of Sub-Folders within that Folder, as I understand it, the Kickabout Folder is at the same "level" as the Inbox.

I interrogate the Sender and the Subject of each E:Mail to get me the Folder where I want the E:Mail to go, so, for instance, the line ...

Set MyDest = GetFolder("\\Kickabout\Churchill")

... calls the GetFolder Function and should set MyDest to point at the Churchill Sub-Folder in order to execute the next line ...

MyEMail.Move MyDest

... and move the E:Mail to the correct Sub-Folder.

I must have originally got the GetFolder Function from an online site, as I don't understand what it's doing, it's certainly not my own code ... I have attached the whole Function to this post (ScreenHunter 69.png) ...
 

Attachments

  • ScreenHunter 69.png
    ScreenHunter 69.png
    22.6 KB · Views: 614

vodkasoda

Member
Outlook version
Outlook 2007
Email Account
POP3
I've solved it, previously my top level was called Gary, somehow when I have installed Word 2007 this time around I haven't renamed Personal Folders to Gary, so when I noticed that the Gary level wasn't there I removed it from my program but didn't replace it with Personal Folders !!!

Silly mistake but writing it all down like this helped me to resolve it, so thank you for listening :D !!!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Thanks for the update.

On the GetFolder Function, it's floating around the internet... you need it if you use multiple data files and want to do something in the non-default data file - the code finds the correct folder.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P Automate Outlook Start - No Active Explorer Object Found Using Outlook 10
J An attempt operation failed. An object could not be found at line5. Outlook VBA and Custom Forms 2
B Task List in To-Do Bar 'The operation failed. An object could not be found' Using Outlook 3
M Cannot Send - "Operation failed. An object cannot be found" BCM (Business Contact Manager) 4
R How to get the Items object of the default mailbox of a specific account in a multiple account Outlook? Outlook VBA and Custom Forms 0
A Run time error 424. object required in outlook 2013 Outlook VBA and Custom Forms 10
S VBA Macro - Run-time error '424': object required - Help Please Outlook VBA and Custom Forms 3
J Object Variable or With Block Not Set Error in Outlook 2016 and not Outlook 2013 Outlook VBA and Custom Forms 3
R Macro to copy email to excel - Runtime Error 91 Object Variable Not Set Outlook VBA and Custom Forms 11
J Outlook 2016 is killing me with object.links Outlook VBA and Custom Forms 2
S how to access the properties of a contact given distlist.member object Outlook VBA and Custom Forms 1
R How can I retain embedded object with voting button reply? Using Outlook 5
G run-time 438: object doesn't support this property or method Using Outlook 2
A vb6 run time error 5 when Outlook 2007 Explorer object displayed Outlook VBA and Custom Forms 1
P Problem with a Search-Object resulting from an AdvancedSearch Outlook VBA and Custom Forms 2
T How to get Inspector object from Window handle Outlook VBA and Custom Forms 2
M MailItem object has no property for when a reply was sent Outlook VBA and Custom Forms 3
T Complete the object model Outlook Wishlist 0
M Outlook Contact Object: Is there a "last accessed" date-time prope Outlook VBA and Custom Forms 3
K How to disconnect Application.COMAddIns.Item().Object? Outlook VBA and Custom Forms 4
S RDOMail object is not working in different thread. Outlook VBA and Custom Forms 13
G Error in Outlook Object Model with redemption and google apps prem Outlook VBA and Custom Forms 3
C Unable to cast object of type 'System.Int32' to type 'System.Byte[ BCM (Business Contact Manager) 1
S UserProperties of MailItem object. Outlook VBA and Custom Forms 3
P UserProperty of mail object problem while dealing with custom fold Outlook VBA and Custom Forms 2
J object that has been separated from its underlying RCW Outlook VBA and Custom Forms 11
S How to get RFC822 format message from the MailItem object. Outlook VBA and Custom Forms 4
B Compile error: Object required Outlook VBA and Custom Forms 2
S Strange Behaviour of Explorer Object. Outlook VBA and Custom Forms 1
R Unable to cast COM object" error Outlook VBA and Custom Forms 2
R Unable to cast COM object" error Outlook VBA and Custom Forms 5
R destroying Explorer object pointers on shutdown Outlook VBA and Custom Forms 2
T COM object that has been separated from its underlying RCW Outlook VBA and Custom Forms 1
C Not sync folders not found after MS Outlook 365 update Using Outlook 1
rubaboo The vew cannot be found Outlook VBA and Custom Forms 0
J Outlook 2016 After a search in all mailboxes, where is each message that was found? Using Outlook 6
noshairwan Registry cannot be found, Outlook Security Using Outlook 2
shrydvd Highlight found RegEx pattern Outlook VBA and Custom Forms 3
M Sent mail not showing in Sent Items folder; but they can be found with Search Using Outlook 3
A VBAProject.OTM Not Found Outlook VBA and Custom Forms 2
T outlook.com opens with "item not found" Using Outlook 1
K How to access emails found to be located in "Top of Outlook data file"? Using Outlook 3
G Calendar folder cannot be found (tasks folder cannot be found) Using Outlook 2
T Desktop alerts show but no emails found Using Outlook 1
R Inbox search, current folder, it's in there-but not found. Using Outlook 2
K After Carbonite restore pst files are found in a weird location Using Outlook 2
R Exchange - Locating a user that has log files but is not found using powershell Exchange Server Administration 1
G Script in rule to send to multiple emails found in message bo Outlook VBA and Custom Forms 11
O "Cannot create message because a data file...could not be found" Using Outlook 1
R Clip art search alway no result found in Outlook 2010 Using Outlook 1

Similar threads

Top