Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP REPORTS Using OUTLOOK (... Other OLE Data) ? 1

Status
Not open for further replies.

Docpro777

Programmer
Joined
Jul 1, 2003
Messages
105
Location
US
This is a general question (for now) for any of you:

Peradventure, I'm trying to make VFP reports based on my 'dangerous' knowledge of Visual Basic, COM-Automation, and MS Outlook CONTACTS and/or APPOINTMENTS/SCHEDULES.

I suppose one might start by something like:

1) Import OUTLOOK ITEMS,TASKITEMS,etc. into CURSORS or TEMP-TABLEs.
2) Import oITEMS into VFP ARRAYs and then into temptables.

E.g.,
CREATE CURSOR myCursor(Start T,end T,body c(250))
LOCAL oOutlook,oNameSpace,oDefaultFolder
oOutlook = CREATEOBJECT("outlook.application")
oNameSpace = oOutlook.getnamespace("MAPI")
oDefaultFolder=oNameSpace.GetDefaultFolder(olFolderCalendar)
oItems = oDefaultFolder.items
FOR EACH oItem IN oItems
INSERT INTO myCursor (start,end,body) VALUES (oItem.start,oItem.end,oItem.body)
ENDFOR
SELECT myCursor

Is there not a more seemless way to get those OUTLOOK ITEMS into VFP REPORTS; any suggestions?

Thanks in advance,

Philip M. Traynor, DPM
 
Docpro777

Is there not a more seemless way to get those OUTLOOK ITEMS into VFP REPORTS; any suggestions?

None that I can think of, Outlook's data structure is different than VFP, so the only way to access it is be automating Outlook to make VFP "think" the Outlook data is native.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks Mike and others.

General observations (feel free to interject):

Outlook supports a lot of COM objects, possibly even VFP apps, albeit I can't find or create a VFP COM object (at present) that is picked up by the Outlook Object Browser's COM library.

But running custom COM automation within Outlook forms (e.g., Xcel, Access, etc.) still requires time-intensive VB loop-statements ("For Each Item") to convert Outlook Data to these foreign 'Office' apps.

It also requires a lot more processor time to convert VFP data to outlook data folder items. Imagine the seconds and/or minutes it would take to convert 1000 records of say 60 VFP-fields to Outlook.

And in this day of Hand-helds, synchronization time is a problem.

Outlook REPORTS are generic and unmodifiable (save for headers and footers). Thus, Outlook reports are quite useless for any real office scenario. Thus, Outlook requires COM power at this time.

Customizeable Outlook FORMS are extremely powerful and worthy of integration into VFP-forms for scheduling, contacts, email, task-management, and possibly even for journals... I'm hoping of course that all customized Outlook forms many become COM objects in VFP.

VFP can streamline the user's narrow selection of Outlook 'items' into VFP-data manipulation for a user's extreme mastery over professional office environments.

Any other ideas on integrating PIMS, contacts, schedules, appointments, etc. into VFP, with or without Outlook? Are you all agreed that Outlook COM automation with VFP is a most powerful economical exploitation for office development?

Philip M. Traynor, DPM
 
DocPro777

Outlook supports a lot of COM objects, possibly even VFP apps, albeit I can't find or create a VFP COM object (at present) that is picked up by the Outlook Object Browser's COM library.

Take a look at the September 2000 issue of FoxPro Advisor> There is an interresting article on how to do just that. "Out-Foxing Outlook Call Visual FoxPro within Outlook"

There is an nice FAQ Ramani wrote on using Outlook's Activex Control, rather then automation Outlook (faq184-3808).

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Yes, I used Ramani's class idea and found it in the foundation classes under activex I believe.

I Googled to your FoxAvisor reference and am checking on their prices for membership.

Philip M. Traynor, DPM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top