Not quite sure how to technically describe the task. No VBA experience but looking for a macro that will give an option to set a flag task date as the next monday, tuesday, wednesday, thursday, friday. Grateful for any help. Outlook 2007.
Not quite sure how to technically describe the task. No VBA experience but looking for a macro that will give an option to set a flag task date as the next monday, tuesday, wednesday, thursday, friday. Grateful for any help. Outlook 2007.
See also the sample for how to call the function. Easiest is to have seven such functions. On systems where monday is the first day of the week, this one is for next tuesday:
Public Sub NextTuesday()
MarkItemAsTask 2-weekday(date,vbUseSystemDayOfWeek)
End Sub
This one for next wednesday (note the changing first figure)
Public Sub NextWednsesday()
MarkItemAsTask 3-weekday(date,vbUseSystemDayOfWeek)
End Sub
You can complete it yourself. For sunday the figure is 7. And this one is for next monday:
Public Sub NextWednsesday()
MarkItemAsTask 8-weekday(date,vbUseSystemDayOfWeek)
End Sub
thanks for replying but I don't really understand. I have managed to get it to set a Tuesday but in Jan 1900
Sub NextTuesday(NextTuesday)
Sub SetfollowupTuesdayMacro()
Dim Sel As Outlook.Selection
Set Sel = Application.ActiveExplorer.Selection
Dim Item As Object
Dim j As Integer
For j = 1 To Sel.count
Set Item = Sel.Item(j)
If Item.Class = olMail Then
Dim Mail As MailItem
Set Mail = Item
Mail.MarkAsTask 3 - Weekday(Date, vbUseSystemDayOfWeek)
Mail.TaskStartDate = 3
Mail.Save
End If
Copy all the sample. The first two, MarkItemAsTask and GetCurrentItems, are missing. Then use the samples shown above to call the MarkItemAsTask function.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.