Hello,
Can you someone provide an example of how to create an appointment in outlook.
Thank you,
Create appointment in outlook
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
I copied this from another message. I have never tried it and you probably don't need the SET DATE TO GERMAN unless you are Germany.
James
James
Code: Select all
FUNCTION AddOLappointment( cDate, cTime, nLenInMin, cSubject, cNotiz )
LOCAL hOutlook
LOCAL hApptItem
LOCAL dDate
LOCAL lSave := .F.
TRY
hOutlook := CreateOLEObject( "Outlook.Application" )
hAppItem := OLEInvoke( hOutlook, "CreateItem", 1 )
SET CENTURY ON
dDate := CToD( cDate )
OLESetProperty( hAppItem, "Start", cDate + " " + cTime )
OLESetProperty( hAppItem, "StartTime", cTime + ":00" )
SET CENTURY ON
SET Date TO GERMAN
OLESetProperty( hAppItem, "Duration", nLenInMin * 60 )
OLESetProperty( hAppItem, "Subject", cSubject )
OLESetProperty( hAppItem, "Body", cNotiz )
OLESetProperty( hAppItem, "Mileage", 225 )
OLEInvoke( hAppItem, "Save" )
hAppItem := NIL
hOutlook := NIL
lSave := .t.
CATCH
lSave := .f.
END
RETURN (lSave)
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact: