Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nigel Coates MAPI Class or Outlook class which should I
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00503064
Message ID:
00505152
Vues:
25
You're still not looking in the Windows Temp folder. Try fixa=lcTempPath+obj.GetAttachmentFile(1)

>Nigel
>
>Sorry to be a pain but
>
>According to all your documentation it should work under Outlook 2000. System now looking at Windows\temp folder but only .TMP files in there which I cant do anything with. With the following code shouldn't fixa & fred contain the full path to the attachment? If I have to copy / append the file out of Outlook cna you please give me the syntax of the copy line as it would apply to my code as I cant do anything with it.
>
>Thanks for your help
>
>Colin
>
>clear
>clear all
>set talk on
> lnTempLength=512
> lcTempPath=Space(lnTempLength)
>
> Declare Integer GetTempPath In Win32API Integer, String@
>
> lnReturn=GetTempPath(lnTempLength, @lcTempPath)
>
> If lnReturn<=lnTempLength
> lcTempPath=Left(lcTempPath, lnReturn)
> Else
> lcTempPath=""
> Endif
>
>
>
>
>
>public fred,lnattachcount,messa,texa,fixa
>dimension fred(10)
>fred=""
>
>store "" to wap,messa,texa
>store 0 to lnattachcount,freda,fixa
>SET CLASSLIB TO OutlookMail
>oObj=CREATEOBJECT("cusMail")
>freda=oOBJ.ReadMail()
>messa=oOBJ.GetFirstMessage()
>lnAttachCount=oOBJ.GetAttachmentCount()
>if lnAttachCount>0
>
>
>fixa=oObj.GetAttachmentFile(1)
>wait window fixa
>
>fred(1)=fixa
>endif
>for ttt=2 to freda-1
>messa=oOBJ.GetNextMessage()
>lnAttachCount=oOBJ.GetAttachmentCount()
>if lnAttachCount>0
>
>fixa=oObj.GetAttachmentFile(1)
>
>fred(ttt)=fixa
>wait window fixa
>
>endif
>next
>set talk on
>messa=oOBJ.GetLastMessage()
>lnAttachCount=oOBJ.GetAttachmentCount()
>if lnAttachCount>0
>fixa=oObj.GetAttachmentFile(1)
>
>fred(ttt)=fixa
>wait window fixa
>
>endif
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform