Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automatic poller
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00509099
Message ID:
00509667
Vues:
29
Larry,
Thanks for code . It will take me a while to digest it , which I hope to do in the next few days.

Just one thing I am not 100% clear on.

What is the differencr between :-
(a) Creating an Object Refernce to Outlook(e.g By doing something like ...OutApp=CreateObject("Outlook.application") and then querying its properties
and
(B) Using VFPCom as you suggest.

I've used Excel in this way before so am familiar with it.


Regards,

Gerard







>Gerard,
>Here is an example of the file ExportEvents creates.
>DEFINE CLASS ApplicationEvents AS custom
>
>	PROCEDURE ItemSend(Item,Cancel)
>	* Add user code here
>	ENDPROC
>
>	PROCEDURE NewMail
>	* Add user code here
>	local lnhand
>	lnhand = fcreate("c:\temp\outlook.txt")
>	if lnhand > 0 then
>		=fputs(lnhand,"File just created")
>		=fclose(lnhand)
>	endif
>	ENDPROC
>
>	PROCEDURE OptionsPagesAdd(Pages)
>	* Add user code here
>	ENDPROC
>
>	PROCEDURE Quit
>	* Add user code here
>	ENDPROC
>
>	PROCEDURE Reminder(Item)
>	* Add user code here
>	ENDPROC
>
>	PROCEDURE Startup
>	* Add user code here
>	ENDPROC
>ENDDEFINE
>I add the code to the NewMail method. When bound togther, eveytime you receive a new message in Outlook that code will execute.
>
>Example of using VFPCOM:
>ovfpcom = createobject("vfpcom.comutil")
>ooutlook = getobject(,"outlook.application") && gets reference to currently running instance of Outlook
>oappevents = newobject("applicationevents") && create instance of exported class
>ovfpcom.BindEvents(ooutlook,oappevents) && bind the two objects together
>Whenever the user sends something, you get an object reference to it in the Item parameter. You can query it, change it, etc. When a user receives new mail, the NewMail method will fire. You can open the Inbox, get the new mail, extract information from it and populate VFP tables if you want.
>
>>Larry, thanks for your reply.
>>
>>Just so as i CAN ATTEMP TO NDERSTAND THIS, IF YOU CAN BEAR WITH ME:-
>>
>>I write a class in VFP (with VFPCOM embedded)
>>This can be set up to 'Listen' to Outlook (e.g. for Inbox stuff coming in)
>>Within my class,I take wahtever action I want to.. e.g.Save a file, and run an update
>>
>>Is this the idea . Presumably this means I have to have my VFP program always loaded waiting for events to happen in Outlook ?
>>
>>If it workd like this, I think I am a good bit down the road !!!
>>
>>regards,
>>
>>Gerard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform