Adding follow flag for me by macro (MSO2007)

  • Thread starter Thread starter Jarda L.
  • Start date Start date
J

Jarda L.

I'd like to create a button which add follow up flag for me, not for
recipient (in new mail). How to do it? Manually I am able to add flag for me
by using Custom flag dialog. I use Outlook 2007.

Please help me edit undermentioned lines of macro, I couldn't find
properties for Flag for me. Macro creates flag for recipient.

Sub AddFlag()
Set objOL = CreateObject("Outlook.Application")
objOL.ActiveInspector.CurrentItem.Categories = "Wait or..."
objOL.ActiveInspector.CurrentItem.FlagStatus = olFlagMarked
objOL.ActiveInspector.CurrentItem.FlagRequest = "Wait For.."
objOL.ActiveInspector.CurrentItem.FlagDueBy = Now() + 7
objOL.ActiveInspector.CurrentItem.FlagIcon = 6

End Sub

Thanks a lot.
Jarda
 
Take a look at the MarkAsTask method and TaskDueDate property:

Set Message = Application.ActiveInspector.CurrentItem
With Message
.MarkAsTask olMarkThisWeek
.TaskDueDate = #3/24/2009#
.TaskSubject = "Follow up with " & Message.SenderName
.ReminderSet = True
.ReminderTime = #3/18/2009 8:30:00 AM#
.Save
End With
 
Thank you for suggestion. Macro works well with sent or received items. But
not with new message or concepts what is my goal.

Run-time error '-2147467263 (80004001) -
Property .MarkAsTask is suported on sent or received items.

Jarda L.
 
Sorry, I missed the part about this being a new message. I think what you'll
have to do is monitor the Sent Items folder for new items using the
Folder.Items.ItemAdd event and use the method and properties I suggested on
the sent item. I think Outlook itself keeps the flag information in memory
for draft items and doesn't write the information to the item until after
it's delivered to the outbound server.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
Back
Top