Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving values from Outlook object
Message
De
28/09/2001 13:14:29
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
28/09/2001 12:24:46
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00561949
Message ID:
00562018
Vues:
32
>>>I am using Outlook from my VFP6 program to send an email. I default the recipient, etc. and then show the Outlook form for the user to make changes and send the email. When the user sends, I want to retrieve the message text and use it in my VFP program. How can I get the text of the message that the user sent?
>>
>>If oMessage is your object, the text should be in oMessage.body; if it's a HTML message, then oMessage.HTMLBody. However, I have used this on old messages only (working on archiving into .dbf, Outlook seems to have no track of related messages). These properties exist for a outlook.MailItem object.
>
>This works for passing a message TO the object, but it doesn't seem to work for retrieving the message FROM the object once a user has changed the text of the message. Any other suggestions appreciated.

It's probably already moved to Sent folder, so you'd need to get it from there. It should be something like
oFolder=oOutlook.session.folders("Sent")
oLastMessage=oFolder.messages(oFolder.oFolder.messages.count)
but I'm not sure how does Outlook store the most recent message into the collection - as first, last or what. I also don't know if folder name is accepted as a parameter in the first line, or it needs a constant, which I actually don't have, but can be obtained from Outlook's object browser.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform