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
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing