View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
RPIJG[_32_] RPIJG[_32_] is offline
external usenet poster
 
Posts: 1
Default Defining the subject of an Email by value in range

Ok, so now I'm using


Code
-------------------
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "dd-mm-yy ")
Application.ScreenUpdating = False
Sheets("Quote").Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Quote " & ThisWorkbook.Name _
& " " & strdate & ".xls"
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Your Synthetic Shield Invoice for your " + Sheets("Quote").Range("E47").Text + Sheets("Quote").Range("E49").Text + Sheets("Quote").Range("E51").Text
.Body = "Here is your Synthetic Shield Invoice as you requested. Thanks Again for your service."
.Attachments.Add wb.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Display
End With
.ChangeFileAccess xlReadOnly
Kill .FullName
End With
Application.ScreenUpdating = True
Set OutMail = Nothing
Set OutApp = Nothin
-------------------


and I'm recieving an error at the DimApp line (the first line),
checked to make sure I had made the reference and it was there? wher
have I gone wrong

--
Message posted from http://www.ExcelForum.com