Hi
I want to write an Excel row value to the body of my new mail.
I have the followng but doesn’t seem to write the value to the body of the mail, all its did was open the workbook
Sub SendMailMessage()
Dim objOLapp As Object, obXLapp As Object
Dim obXLWB As Object
Dim objMailItem As Object
Dim strBody As String
Set obXLapp = CreateObject(“Excel.Application”)
Set objOLapp = CreateObject(“Outlook.Application”)
Set objMailItem = objOLapp.CreateItem(0) ‘0=mailitem
With obXLapp
.Visible = True
Set obXLWB = .Workbooks.Open(“C:Documents and Settingsfrancis yeoDesktopMyFile.xls”)
End With
strBody = obXLWB.ActiveSheet.Range(“A1”).Value
With objMailItem
.Body = strBody
End With
End Sub
Thanks In advance
cheers, francis