Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attachments From Foxpro
Message
De
23/07/2001 15:04:26
Kenneth Downs
Secure Data Software, Inc.
New York, États-Unis
 
 
À
23/07/2001 10:39:16
Information générale
Forum:
Microsoft Office
Catégorie:
Outlook
Divers
Thread ID:
00533579
Message ID:
00534041
Vues:
26
J. Crescencio,

It turned out that the names of the properties and methods simply had nothing to do with the documentation.

I went into visual basic and into the Object browser and found such properties as "FileName" and methods such as "SaveToFile." MSDN gives completely different properties and methods, such as "Name" and "WriteToFile".

Anyway, once I saw everything in the VB Object Browser, I was in business.

Thanks.

>>Folks,
>>
>>I had an easy time translating VBA synatx into Fox as far as obtaining an object references to a message attachment.
>>
>>Oddly enough, nothing seems to work after this. I can access no properties or methods of the attachment object. Everything comes back with an OLE error 'Uknown name.' What am I doing wrong? Is there some gotcha in here I am unaware of?
>>
>>The only thing I can get returned is Attachments.Count property, which gives 1, as expected.
>>
>>ENVIRONMENT:
>>Win 2k Server
>>Office 2k Pro
>>
>>WHAT WORKS SO FAR:
>>
>>public olMAPI,om,ofld
>>
>>olMAPI = createObject("Outlook.Application")
>>om = olmapi.GetNameSpace("MAPI")
>>ofld = om.Folders(1).Folders("temp")
>>
>>? oFld.Items.Count
>>? oFld.Items(x).Attachments.Count
>>
>>
>>According to the documentation, any of the following should work:
>>
>>oFld.Items(x).Attachments(1).WriteToFile("Temp.Txt")
>>oFld.Items(x).Attachments(1).Name
>>
>>none of them do!
>>
>>Any help?
>>
>>TIA
>
>Could it be that both the Folders and Attachments collections start at 0 instead of 1?
>
>If the assignment to oFld didn't return an object then any reference to oFld will give the error message you're experiencing.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform