>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