P
Pat Curran
Hi
I have my calendar of events on a lan. I have a subdirectory of my calendar
called "Leave" that is also a calendar. It is used for all employee
vacations. I am trying to write to this directory and having problems. My
app keeps writing to the "Calendar" directory and not the Subdirectory of
the calendar "Leaves" directory. I have outlook open and am in the Leave
directory when I run this procedure:
PROCEDURE WriteLeavesToLeaveCalendar
local myOlApp, olMAPI, F, cEntryID, cStoreID, myFolder
myOlApp = new oleautoclient('outlook.application')
olMAPI = myOlApp.GetNameSpace("MAPI")
F = myOlApp.activeExplorer.currentFolder
cEntryID = f.entryID
cStoreID = f.storeID
myFolder = olMAPI.getFolderFromID( cEntryID, cStoreID )
myItem=myOlApp.CreateItem(1) && CalendarItem
myItem.Subject = "Leave: " + ltrim(rtrim(tmplv->Name))
myItem.Body = tmplv->type + chr(13) + tmplv->Address
myItem.Start = dtoc(tmplv->from)+ ' 00:09:00 AM'
myItem.End = dtoc(tmplv->to)+ ' 00:05:00 PM'
myItem.AllDayEvent = .t.
myItem.save()
RETURN
form.ReleaseLeaveCalendarItem( myOlApp )
Am I missing something? It posts the items....but only to the Calendar
Directory. is there a way programitacally I could temporarily change the
default directory to leave and then change it back again?
Thanks for any help
Pat
I have my calendar of events on a lan. I have a subdirectory of my calendar
called "Leave" that is also a calendar. It is used for all employee
vacations. I am trying to write to this directory and having problems. My
app keeps writing to the "Calendar" directory and not the Subdirectory of
the calendar "Leaves" directory. I have outlook open and am in the Leave
directory when I run this procedure:
PROCEDURE WriteLeavesToLeaveCalendar
local myOlApp, olMAPI, F, cEntryID, cStoreID, myFolder
myOlApp = new oleautoclient('outlook.application')
olMAPI = myOlApp.GetNameSpace("MAPI")
F = myOlApp.activeExplorer.currentFolder
cEntryID = f.entryID
cStoreID = f.storeID
myFolder = olMAPI.getFolderFromID( cEntryID, cStoreID )
myItem=myOlApp.CreateItem(1) && CalendarItem
myItem.Subject = "Leave: " + ltrim(rtrim(tmplv->Name))
myItem.Body = tmplv->type + chr(13) + tmplv->Address
myItem.Start = dtoc(tmplv->from)+ ' 00:09:00 AM'
myItem.End = dtoc(tmplv->to)+ ' 00:05:00 PM'
myItem.AllDayEvent = .t.
myItem.save()
RETURN
form.ReleaseLeaveCalendarItem( myOlApp )
Am I missing something? It posts the items....but only to the Calendar
Directory. is there a way programitacally I could temporarily change the
default directory to leave and then change it back again?
Thanks for any help
Pat