Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS OUTLOOK automation - Calendar/Appointment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01080757
Message ID:
01080897
Vues:
13
>Hi,
>
>I need help how to accomplish below code to be shown in a VFP form.

>
ol = CREATEOBJECT("Outlook.Application")
>olns = ol.GetNameSpace("MAPI")
>MyTasksFolder = olns.GetDefaultFolder(9)


>The code above will invoke the MS Outlook Calendar in its own window, how can I make it appear inside a VFP form? Is it by using an Ole control? Or is it better a create a class for it.
>
>Thanks.
I might have some MAPI code - but heres the solution using CDOEX - note the date formats - that - as I remember - was important:
*CDOEX Send Appointment
cdoRequiredParticipant = 0
cdoOptionalParticipant = 1

oInfo     =CREATEOBJECT('AdSystemInfo')
oAttn     =CREATEOBJECT('CDO.Attendee')
oAppt     =CREATEOBJECT('CDO.Appointment')
oCnfg     =CREATEOBJECT('CDO.Configuration')
oPers     =CREATEOBJECT('CDO.Person')

dtStart   =CTOT("08/16/2005 02:00:00 PM")
dtEnd     =CTOT("08/16/2005 03:00:00 PM")

oAppt.Configuration=oCnfg
oAppt.MeetingStatus="Confirmed"
oAppt.StartTime=dtStart
oAppt.EndTime=dtEnd
oAppt.Subject=[CDOEX Appointment Subject ]+TTOC(DATETIME())
oAppt.Location=[CDOEX Appointment Location ]+TTOC(DATETIME())
oAppt.TextBody=[CDOEX Appointment TextBody ]+TTOC(DATETIME())
oAttendee=oAppt.Attendees.Add
oAttendee.Address="myeamil@mydns.com"
oAttendee.Role=cdoRequiredParticipant
oCalMsg=oAppt.CreateRequest
oCalMsg.Message.Send
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform