General information
Title:
'name' cannot be enumerated (Error 1794)
A previously functioning vfp 5.0a app has begun failing on all code that includes FOR EACH ... NEXT loop to access a collection of objects returned from a CDO automation object. The collections are collections of folder objects or message recipients. When the program hits the FOR EACH line, the app fails with the error code 1794 :
'name' cannot be enumerated (Error 1794)
Some Example code :
loFoldersColl = loSearchFolder.Folders
IF TYPE('loFoldersColl') = 'O'" AND !ISNULL(loFoldersColl)
FOR EACH loFolder IN loFoldersColl
IF UPPER(loFolder.Name) = lcFolderName
lcFolderID = loFolder.ID
EXIT
ENDIF
NEXT && loFolder
ENDIF
In all instances, the collection is a valid object that contains member items (not an empty collection). The app works fine on 2 other PC's.
TIA for any advice
Bill Sabo
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only