Outlook Macro (VBA) to Forword Open Task to Another User

I have Outlook 2010.

I need the code for an Outlook macro which will take my currently opened task from MYMAILBOX and forward this task to another mailbox named UPDATECPI.

It will end up in the UPDATECPI mailbox as an email in the inbox with the task as an attachment.

Can anyone help me with this.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
This is a very simple approach. You need to have the task selected, then run the macro:
Sub ForwardTask()
Dim itm
  If ActiveExplorer.Selection.Count = 1 Then
    Set itm = ActiveExplorer.Selection.Item(1)
    If TypeName(itm) = "TaskItem" Then
      With Application.CreateItem(olMailItem)
        .To = "UPDATECPI@company.com"
        .Subject = "Forwarded Task"
        .Attachments.Add itm
      End With
    End If
  End If
End Sub

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Senniger1Author Commented:
That is perfect.  Is there any way the Subject of the forwarded item can match the subject of the task?
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Sure. Replace line 8:
        .Subject = itm.Subject

Open in new window

Senniger1Author Commented:
This was perfect and the additional information you provided was exactly what I needed.  

Thank you very much!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.