SQLScholar
Programmer
Hey,
If i have the code below.
and i want the subject to be a combination of a cell and the file name of the running excel file.
How do i do this??
TIA
Dan ----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
If i have the code below.
Code:
Public Function SendEmail(Optional msgCC As String, Optional msgSubject As String, Optional msgBody As String, Optional ImportanceHigh As Boolean = False, Optional SendNow As Boolean = False)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.To = "me@here.com"
.Subject = "this"
.Body = "Type Problem/Query/Comment here"
.Importance = olImportanceHigh
.Display (True)
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Function
and i want the subject to be a combination of a cell and the file name of the running excel file.
How do i do this??
TIA
Dan ----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!