This is a multi-part message in MIME format.

------=_NextPart_000_0014_01C52F88.E7C7DCE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,

I have a problem when I'm trying to delete an appoint from Outlook =
through Foxpro. Here's the code I'm using :=20

oOutlook =3D CREATEOBJECT('Outlook.Application')
oNameSpace =3D oOutlook.getNameSpace('MAPI')
oAppts =3D oNameSpace.getDefaultFolder(9)

cString =3D 'My apppointment'

oDelAppt =3D oAppts.Items.Find(cString)
IF (TYPE('oDelAppt') =3D 'O') AND !ISNULL(oDelAppt)
oDelAppt.Delete() <----- Error
ENDIF

When I issu the 'delete()' command I get an error 'Parameter is not =
optional'.
I've tried this on Foxpro 8 & Foxpro 9 with Oulook 2003.

Any ideas ?

greetings
Xavier







------=_NextPart_000_0014_01C52F88.E7C7DCE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial size=3D2>Hi all,</FONT></P>
<P><FONT face=3DArial size=3D2>I have a problem when I'm trying to =
delete an appoint=20
from Outlook through Foxpro. Here's the code I'm using : </FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; oOutlook =3D=20
CREATEOBJECT('Outlook.Application')<BR>&nbsp;&nbsp;&nbsp; oNameSpace =3D =

oOutlook.getNameSpace('MAPI')<BR>&nbsp;&nbsp;&nbsp; oAppts =3D=20
oNameSpace.getDefaultFolder(9)</FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; cString =3D 'My=20
apppointment'</FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; oDelAppt =3D=20
oAppts.Items.Find(cString)<BR>&nbsp;&nbsp;&nbsp; IF (TYPE('oDelAppt') =
=3D 'O') AND=20
!ISNULL(oDelAppt)<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
oDelAppt.Delete()=20
&lt;----- Error<BR>&nbsp;&nbsp;&nbsp; ENDIF</FONT></P>
<P><FONT face=3DArial size=3D2>When I issu the 'delete()' command&nbsp; =
I get an=20
error 'Parameter is not optional'.<BR>I've tried this on Foxpro 8 &amp; =
Foxpro 9=20
with Oulook 2003.</FONT></P>
<P><FONT face=3DArial size=3D2>Any ideas ?</FONT></P>
<P><FONT face=3DArial size=3D2>greetings<BR>Xavier</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P></DIV></BODY></HTML>

------=_NextPart_000_0014_01C52F88.E7C7DCE0--

Re: delete outlook appointment by Nuyttens

Nuyttens
Wed Mar 23 07:49:49 CST 2005

This is a multi-part message in MIME format.

------=_NextPart_000_0016_01C52FB7.935885E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I think I solved the problem, simple referring a property of the object =
first seems to solve the problem.

like :

cSubject =3D oDelAppt.Subject
oDelAppt.Delete() <----- Works fine

Greetings
Xavier

"Nuyttens Xavier" <xavier@cpsit.be> schreef in bericht =
news:QA90e.43793$pB6.3715123@phobos.telenet-ops.be...
Hi all,

I have a problem when I'm trying to delete an appoint from Outlook =
through Foxpro. Here's the code I'm using :=20

oOutlook =3D CREATEOBJECT('Outlook.Application')
oNameSpace =3D oOutlook.getNameSpace('MAPI')
oAppts =3D oNameSpace.getDefaultFolder(9)

cString =3D 'My apppointment'

oDelAppt =3D oAppts.Items.Find(cString)
IF (TYPE('oDelAppt') =3D 'O') AND !ISNULL(oDelAppt)
oDelAppt.Delete() <----- Error
ENDIF

When I issu the 'delete()' command I get an error 'Parameter is not =
optional'.
I've tried this on Foxpro 8 & Foxpro 9 with Oulook 2003.

Any ideas ?

greetings
Xavier







------=_NextPart_000_0016_01C52FB7.935885E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I think I solved the problem, simple =
referring a=20
property of the object first seems to solve the problem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>like :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>cSubject =3D =
oDelAppt.Subject</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>oDelAppt.Delete() &lt;----- Works =
fine</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Greetings</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Xavier</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Nuyttens Xavier" &lt;<A=20
href=3D"mailto:xavier@cpsit.be">xavier@cpsit.be</A>&gt; schreef in =
bericht <A=20
=
href=3D"news:QA90e.43793$pB6.3715123@phobos.telenet-ops.be">news:QA90e.43=
793$pB6.3715123@phobos.telenet-ops.be</A>...</DIV>
<DIV>
<P><FONT face=3DArial size=3D2>Hi all,</FONT></P>
<P><FONT face=3DArial size=3D2>I have a problem when I'm trying to =
delete an=20
appoint from Outlook through Foxpro. Here's the code I'm using : =
</FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; oOutlook =3D=20
CREATEOBJECT('Outlook.Application')<BR>&nbsp;&nbsp;&nbsp; oNameSpace =
=3D=20
oOutlook.getNameSpace('MAPI')<BR>&nbsp;&nbsp;&nbsp; oAppts =3D=20
oNameSpace.getDefaultFolder(9)</FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; cString =3D 'My=20
apppointment'</FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; oDelAppt =3D=20
oAppts.Items.Find(cString)<BR>&nbsp;&nbsp;&nbsp; IF (TYPE('oDelAppt') =
=3D 'O')=20
AND !ISNULL(oDelAppt)<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
oDelAppt.Delete() &lt;----- Error<BR>&nbsp;&nbsp;&nbsp; =
ENDIF</FONT></P>
<P><FONT face=3DArial size=3D2>When I issu the 'delete()' =
command&nbsp; I get an=20
error 'Parameter is not optional'.<BR>I've tried this on Foxpro 8 =
&amp; Foxpro=20
9 with Oulook 2003.</FONT></P>
<P><FONT face=3DArial size=3D2>Any ideas ?</FONT></P>
<P><FONT face=3DArial size=3D2>greetings<BR>Xavier</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial =
size=3D2></FONT>&nbsp;</P></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0016_01C52FB7.935885E0--