Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing the Inbox in Outlook
Message
 
À
20/07/2004 12:17:10
James Fuchs
Kenneth B. Moll & Associates, Ltd.
Chicago, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00926159
Message ID:
00926165
Vues:
17
Try this.
        #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
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform