Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert text file contents into Outlook e-mail body??
Message
From
13/08/2001 13:36:21
 
 
To
08/08/2001 18:04:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00541587
Message ID:
00543135
Views:
21
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform