E
Enrico
Goodmornig,
i have create my routine for create one appointment in outlook 2003.
It's all ok but the last of running my code compare an error
"OLE error code 0x00000001. Function is incorrect"
This is my routine:
#DEFINE olFolderCalendar 9
#DEFINE olFolderContacts 10
#DEFINE olFolderDeletedItems 3
#DEFINE olFolderInBox 6
#DEFINE olFolderJournal 11
#DEFINE olFolderNotes 12
#DEFINE olFolderOutBox 4
#DEFINE olFolderSentMail 5
#DEFINE olFolderTask 13
#DEFINE olBusy 2
#DEFINE True .T.
#DEFINE False .F.
#DEFINE olPrivate 2
#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2
#DEFINE olAppointmentItem 1
#DEFINE olContactItem 2
#DEFINE olDistributionListItem 7
#DEFINE olJournalItem 4
#DEFINE olMailItem 0
#DEFINE olNoteItem 5
#DEFINE olPostItem 6
#DEFINE olTaskItem 3
#DEFINE olImportanceHigh 2
#DEFINE olMeetingStatus 1
LOCAL oOutlook,oNameSpace,oDefaultFolder,oitems
oOutlook = CREATEOBJECT('outlook.application')
oNameSpace = oOutlook.getnamespace('MAPI')
DefaultFolder=oNameSpace.GetDefaultFolder(olFolderCalendar)
oOutlook = oDefaultFolder.Application.CreateItem(olAppointmentItem)
oItems = oDefaultFolder.items
WITH oOutlook
.IsOnlineMeeting = False
.Location = "Personal Folders\\Calendar"
.Recipients.Add("(e-mail address removed)")
.Subject = "Manutenzione pianificata"
.Body = "Body"
.Importance = olImportanceHigh
.Location = "LOCATION"
.Start = "27/09/2008 12:00:00"
.End = "27/09/2008 12:00:00"
.ReminderSet = true
.ReminderMinutesBeforeStart = 4320
.MeetingStatus = 1
.ResponseRequested = True
.save()
.send ***** This is the problem. Without this istruction nothing problem
but nothing send appotinment to recipient.
EndWith
i have create my routine for create one appointment in outlook 2003.
It's all ok but the last of running my code compare an error
"OLE error code 0x00000001. Function is incorrect"
This is my routine:
#DEFINE olFolderCalendar 9
#DEFINE olFolderContacts 10
#DEFINE olFolderDeletedItems 3
#DEFINE olFolderInBox 6
#DEFINE olFolderJournal 11
#DEFINE olFolderNotes 12
#DEFINE olFolderOutBox 4
#DEFINE olFolderSentMail 5
#DEFINE olFolderTask 13
#DEFINE olBusy 2
#DEFINE True .T.
#DEFINE False .F.
#DEFINE olPrivate 2
#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2
#DEFINE olAppointmentItem 1
#DEFINE olContactItem 2
#DEFINE olDistributionListItem 7
#DEFINE olJournalItem 4
#DEFINE olMailItem 0
#DEFINE olNoteItem 5
#DEFINE olPostItem 6
#DEFINE olTaskItem 3
#DEFINE olImportanceHigh 2
#DEFINE olMeetingStatus 1
LOCAL oOutlook,oNameSpace,oDefaultFolder,oitems
oOutlook = CREATEOBJECT('outlook.application')
oNameSpace = oOutlook.getnamespace('MAPI')
DefaultFolder=oNameSpace.GetDefaultFolder(olFolderCalendar)
oOutlook = oDefaultFolder.Application.CreateItem(olAppointmentItem)
oItems = oDefaultFolder.items
WITH oOutlook
.IsOnlineMeeting = False
.Location = "Personal Folders\\Calendar"
.Recipients.Add("(e-mail address removed)")
.Subject = "Manutenzione pianificata"
.Body = "Body"
.Importance = olImportanceHigh
.Location = "LOCATION"
.Start = "27/09/2008 12:00:00"
.End = "27/09/2008 12:00:00"
.ReminderSet = true
.ReminderMinutesBeforeStart = 4320
.MeetingStatus = 1
.ResponseRequested = True
.save()
.send ***** This is the problem. Without this istruction nothing problem
but nothing send appotinment to recipient.
EndWith