Working from the code you posted in post #7...
Code:
'Line added
Private Const conFile As String = _
"C:\Documents and Settings\reo\My Documents\" & _
"ContractReports\ReportsOConnor.rtf"
Function ROconnerMail()
'Line changed
If Exist(conFile) Then Call RunROconnerEMail(strFile:=conFile)
End Function
'Line changed
Sub RunROconnerEMail(ByRef strFile As String)
On Error GoTo Err_Handler
Dim strTemp As String
Dim varAttach(2) As Variant
Dim strRecTo(1, 0) As String
Dim strRecCc(1, 0) As String
Dim lngCount As Long
Dim varProxies As Variant
Dim cGW As GW
'Line changed
varAttach(0) = strFile
strRecTo(0, 0) = "reo@propeople.org"
strRecTo(1, 0) = "reo@propeople.org"
strRecCc(0, 0) = "tpg@propeople.org"
Set cGW = New GW
With cGW
.Login
.BodyText = "Attached please find a word document that lists: " & _
"contract reports that are over due and contract reports " & _
"that are due within one to three weeks. " & vbCrLf & vbCrLf & _
"Please ensure that the reports are completed and sent " & _
"to the contract officer on time. A copy of the dated " & _
"cover letter transmitting the report and the report " & _
"itself should be sent to the Accounting Specialist in " & _
"the Finance Office. The Accounting Specialist will " & _
"update the Contracts database with the date the report " & _
"was submitted and file the report in the contract file " & _
"for the compliance audits." & vbCrLf & vbCrLf & _
"If no document is attached to this automated e-mail " & _
"then you have no past due reports and no reports due " & _
"within the next three weeks." & vbCrLf & vbCrLf & _
"For questions please contact the Accounting Specialist " & _
"at 874-1140 ext 356. Thank you."
.Subject = "Contract Reports"
.RecTo = strRecTo
.RecCc = strRecCc
.FileAttachments = varAttach
.FromText = "Finance Department"
.Priority = "High"
strTemp = .CreateMessage
.ResolveRecipients strTemp
If IsArray(.NonResolved) Then MsgBox "Some unresolved recipients."
.SendMessage strTemp
.DeleteMessage strTemp, True
End With
Exit_Here:
Set cGW = Nothing
Exit Sub
Comment