Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access individual outlook emails
Message
De
13/07/2005 09:43:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01030010
Message ID:
01032190
Vues:
24
This message has been marked as the solution to the initial question of the thread.
>Thanks Joaquim.
>
>I dont seem to be explaining my problem in the correct way. With the unique entry id i now store in my table i want to view the email within Outlooks editor ie as you would by double clicking on the item in Outlook.
>
>Thanks for your patience

Ok, that's easy:
aplicacao = createobject("outlook.application")
espaco = aplicacao.GetNamespace("MAPI")
inbox = espaco.GetDefaultFolder(6)

* First: choose a message an retrive its Entry ID
SelectedMessage = inbox.items(50)
UniqueReferenceToMessage = SelectedMessage.EntryID

* Second: run through Inbox and try to find that message by looking it's Entry Id
TotalMsgs = inbox.items.count
for i = 1 to TotalMsgs
	ActualMessage = inbox.items(i)
	
	if ActualMessage.EntryID = UniqueReferenceToMessage
		= messagebox("Message nr. " + transform(i) + chr(13) + ;
		"Subject: " + substr(ActualMessage.subject,1,40) + chr(13) + ;
			"Body: " + substr(ActualMessage.body,1,40) + chr(13) + ;
			"Nr. of Attachments: " + transform(ActualMessage.attachments.count))
		
		actualmessage.display
		exit
	endif
next

inbox = null
espaco = null
aplicacao = null
Note the line 'actualmessage.display', it'll do the job

Joaquim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform