#INCLUDE Outlook.h CLEAR ** Define variables LOCAL oOutlook, oNameSpace, oFolder, cFolderToFind cFolderToFind = "Stuff" ** Create an instance of outlook oOutlook = CREATEOBJECT("Outlook.Application") ** Create an instance of the namespace object oNameSpace = oOutlook.GetNameSpace("MAPI") ** Get a reference to the inbox oInbox = oNameSpace.GetDefaultFolder(OL_FOLDERINBOX) ** Loop once for each subfolder FOR nFolder = 1 TO oInbox.Folders.Count ** Get a reference to the folder at this position oFolder = oInbox.Folders.Item(nFolder) ** Check the name IF oFolder.Name = cFolderToFind ** If it matches, exit the loop EXIT ENDIF ENDFOR ** Display the folder name ? oFolder.Name RETURN