Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatic poller
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00509099
Message ID:
00509192
Views:
23
Gerard,
VFPCOM can be downloaded from http://msdn.microsoft.com/vfoxpro/downloads/updates.asp. It is a utility that you can use to bind events of COM servers/objects to methods of the same name in a VFP class. This functionality has been integrated into the main product in VFP 7 with the new EventHandler function.

ExportEvents will export the events of an object into a file with the necessary DEFINE CLASS warpper. The BindEvents method of VFPCOM "binds" the objects together. Whenever an event is triggered in something like Outlook, the associated object.method is fired in the VFP object. You can do anything you want.

You can get a listing of Outlook object model from the VBOUTL9.CHM for Outlook 2000 (VBOUTL8.HLP for Outlook 97). With that you can open the Inbox and do what you want to the new message. Della Martin and Tamar Granor have a book out on automating Office and that includes Outlook. Also, John Koziol has posted several messages automating Outlook so you can do a search for that.

HTH.

>Larry, thanks for your reply.
>What you suggest seems very interesting. What is VFPCOM and where do I get it.
>
>Do I understand from what you are syaing is that somehow VFPCOM interfacres with Outlook, and then I can write code to export and inport files automatically in VFP.
>
>
>Thanks for your help
>
>Gerard
>
>
>
>
>
>>>Hi.
>>>I am currently designing an app for a company which has a Head Office and a Remote Site.They want to be able to tansmit and receive files automatically at regular intervals. e,g,
>>>Head Office 'Sends' a no. of files and receives files every Hour
>>>Branch office Receives these files every 2 hours and sends some files back
>>>(The head Office and Branch office then act on these Files)
>>>
>>>Their preferred method is to use Email and a method of accessing Inboxes and Outboxes automatically from VFP. Is this practcal,or is there another utility I should be looking at.
>>>(The main systems in place are Foxpro)
>>>
>>>Regards,
>>>
>>>Gerard
>>
>>Gerard,
>>You could set it up without polling using the VFPCOM utility. Use the ExportEvents to export the events of the Outlook object. Using the exported file, create a class. Create an object using the new class and use the BindEvents method of the VFPCOM utility to bind the two together. The NewMail and ItemSend events of the Outlook object fire when you receive mail and send mail, respectively. When the Outlook events fire, the bound methods of the same name will fire with your code.
>>
>>Hope this gives you an idea.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform