Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error send appointment with vfp

9 views
Skip to first unread message

Enrico

unread,
Sep 30, 2008, 11:35:01 AM9/30/08
to
Goodmorning,
i have create a procedure to create and send appontiment to recepient.

This is my procedure and I have one problem when i send it.
#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')
oDefaultFolder=oNameSpace.GetDefaultFolder(olFolderCalendar)
oOutlook = oDefaultFolder.Application.CreateItem(olAppointmentItem)
oItems = oDefaultFolder.items
WITH oOutlook
.IsOnlineMeeting = False
.Location = "Personal Folders\\Calendar"
.Recipients.Add("ma...@mail.com")
.Subject = "subject"
.Body = "bdy"
.Importance = olImportanceHigh
.Location = "Ilsa"
.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
EndWith
The problem is when i send all.
OLE error 0x00000001. Function is incorrect

Whitout send the appontiment saved in my calendar but not sent to the
rececipient.
Please help me!!

rdelacroix

unread,
Nov 12, 2008, 11:16:28 AM11/12/08
to
You used 2 times the same variable oOutlook for 2 differents objects!

> oOutlook = CREATEOBJECT('outlook.application')
> oOutlook = oDefaultFolder.Application.CreateItem(olAppointmentItem)
the last oOutlook don't know about send()

"Enrico" <Enr...@discussions.microsoft.com> a écrit dans le message de
groupe de discussion : 61E82C2A-2F11-4320...@microsoft.com...

0 new messages