This will create an appointment in both sender and recipients calendar
LOCAL loOutlook AS Outlook.Application
LOCAL loNameSpace AS Outlook.NameSpace
LOCAL loAppoint AS Outlook.AppointmentItem
loOutlook = CREATEOBJECT('Outlook.Application')
loNameSpace = loOutlook.GetNamespace("MAPI")
loNameSpace.Logon
loAppoint = loOutlook.CreateItem( 1 )
WITH loAppoint AS Outlook.AppointmentItem
.Subject = "Test appointment"
.Start = DATETIME() + (60 * 60)
.Recipients.Add("me@mcrgsoftware.com")
.Save
ENDWITH
loAppoint = .NULL.
loNameSpace = .NULL.
loOutlook = .NULL.
>I never really succeded with Outlook Outomation :-(
>Could you send a little more from your code snippet so I can try it.
>
>Thanks
>
>Peter
>
>
>>>And besides this needs to show on someone else's calendar.
>>
>>If you specify the right receipient, it will end up in that receipient's calendar.
>>
>>>I send emails using wwIPSTUFF
>>
>>I don't think that does calendar events.
>>
>>Perhaps you could use CDO.Appointment
>>
>>
>>>>Just treat it like an e-mail, but create a calendar entry instead.
>>>>
>>>>
oOutlook = CREATEOBJECT('outlook.application')
>>>>oNameSpace = oOutlook.getnamespace('MAPI')
>>>>oCal = oOutlook.CreateItem(3)
>>>>with oCal
>>>>....
>>>>
>>>>
>>>>
>>>>>I know I can send a message to someone which will create a calendar entry for this person.
>>>>>how can this be done from a vfp prg?
>>>>>
>>>>>
>>>>>Peter
>>>Doesn't that bring up the Outlook Hydra? the dreaded 'do you want to allow a message to be sent' dialog
>>>I send emails using wwIPSTUFF and was hoping to format it in a way that oulook taks it as a calendar mail sent form someone else?
>>>
>>>And besides this needs to show on someone else's calendar.
>>>
>>>thanks
>>>
>>>Peter