Hello, I know enough VBA to be dangerous and that is about it. A while back I created a script in a database to recognize an open Outlook session, go to one of the public folders and to download emails into the database. This has worked just fine for years. That ended today. The company upgraded to Windows 7 with MS Office 2010. Now when I run the script I get the Run-Time Error 438 - Object doesn't support this property of method. Here is the code.
'Recognize open session of Outlook.
Set OL = GetObject("", "Outlook.Application")
Set Olns = OL.GetNamespace("MAPI")
'Assign Public Folders to variables.
Set myfolder1 = OL.folders("Public Folders") - This is the line where the error occurs.
Set myfolder2 = myfolder1.folders("All Public Folders")
Set myfolder3 = myfolder2.folders("Department/Division")
Set myfolder4 = myfolder3.folders("Web Based Quote Exceptions")
Set myfolder5 = myfolder4.folders("Deleted Items")
Any advice out there? I would greatly appreciate it!!!