Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert text file contents into Outlook e-mail body??
Message
 
 
À
08/08/2001 18:04:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00541587
Message ID:
00543135
Vues:
30
>How can I drive Outlook 2000 to insert the contents of a text file as the body of an e-mail? I do not want to add it as an attachment???
>
>Below is my Foxpro code that includes it as an attachment, but I want to use it as the body text, so that the recipient does not have to open an attachment.
>
>strProfile = "john_may"
>strPassword = "xxxxx"
>strRecipient = "123546@dfgsdfg.com"
>strSubject = "Test object mail"
>strBody = "this is the message"
>
>theApp = CreateObject("Outlook.Application")
>theNameSpace = theApp.GetNameSpace("MAPI")
>theNameSpace.Logon(strProfile , strPassword)
>theMailItem = theApp.CreateItem(0)
>
>theMailItem.Recipients.Add(strRecipient)
>theMailItem.Subject = strSubject

Try this :
lcFile = FILETOSTR("c:\ww1040c.txt")
theMailItem.Body = strbody + lcFile
>
>theMailItem.Send
>theNameSpace.Logoff


Hope this helps,
Jake
Wine is sunlight, held together by water - Galileo Galilei
Un jour sans vin est comme un jour sans soleil - Louis Pasteur
Water separates the people of the world; wine unites them - anonymous
Wine is the most civilized thing in the world - Ernest Hemingway
Wine makes daily living easier, less hurried, with fewer tensions and more tolerance - Benjamin Franklin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform