Hello,
I am writing a VBA code in Ms Project. I want to take start dates and deadlines of tasks and mail it to resources. However my FindNext does not work. I do not understand why really. Could you help me?
Burcu
Sub mail1()
Dim i As Integer
Dim m As PjMailField
Dim b As Boolean
Dim govde As String
SelectBeginning
b = Find("Start", "equals", Date)
Do
SelectRow
MsgBox ActiveSelection.Tasks(1).Resources.Count & ActiveSelection.Tasks(1).Name
'If Not ActiveSelection.Tasks(1).Resources.Count = 0 Then
'For i = 1 To ActiveSelection.Tasks(1).Resources.Count
'If ActiveSelection.Tasks(1).Deadline <> "" Then
'govde = "Bu otomatik bir iletidir." & "Görev Adi:" & ActiveSelection.Tasks(1).Name & "Teslim Tarihi:" & ActiveSelection.Tasks(1).Deadline
'Else
'govde = "Bu otomatik bir iletidir." & "Görev Adi:" & ActiveSelection.Tasks(1).Name
'End If
b = MailSend("burcu.kagnici@introsolutions.com", , "deneme", govde, , False)
'ActiveSelection.Tasks(1).Resources(i).EMailAddress
'Next i
'End If
MsgBox ActiveSelection.Tasks(1).Name
Loop While FindNext
End Sub
I am writing a VBA code in Ms Project. I want to take start dates and deadlines of tasks and mail it to resources. However my FindNext does not work. I do not understand why really. Could you help me?
Burcu
Sub mail1()
Dim i As Integer
Dim m As PjMailField
Dim b As Boolean
Dim govde As String
SelectBeginning
b = Find("Start", "equals", Date)
Do
SelectRow
MsgBox ActiveSelection.Tasks(1).Resources.Count & ActiveSelection.Tasks(1).Name
'If Not ActiveSelection.Tasks(1).Resources.Count = 0 Then
'For i = 1 To ActiveSelection.Tasks(1).Resources.Count
'If ActiveSelection.Tasks(1).Deadline <> "" Then
'govde = "Bu otomatik bir iletidir." & "Görev Adi:" & ActiveSelection.Tasks(1).Name & "Teslim Tarihi:" & ActiveSelection.Tasks(1).Deadline
'Else
'govde = "Bu otomatik bir iletidir." & "Görev Adi:" & ActiveSelection.Tasks(1).Name
'End If
b = MailSend("burcu.kagnici@introsolutions.com", , "deneme", govde, , False)
'ActiveSelection.Tasks(1).Resources(i).EMailAddress
'Next i
'End If
MsgBox ActiveSelection.Tasks(1).Name
Loop While FindNext
End Sub