> I'm not quite sure what you mean by redirect in this case.
>
> If you want to send a copy of the message to some email address just take
> the copy and clear the Recipients collection and add your own Recipient
> object, resolve it and send it.
>
> You can add a UserProperty to the UserProperties collection of any item.
> That could be a Boolean in this case that is set true when your redirection
> is done.
>
> A code sample for using item.Recipients.Add is in the Object Browser Help,
> as is a sample for using UserProperties.Add.
>
> When an item is opened it's opened in an Inspector. You can handle the
> NewInspector event of the Inspectors collection and use that to set up your
> button initialization. Actually, the button creation should be in the first
> Activate event of that Inspector, before that the CommandBars collection and
> other attributes of the Inspector and Inspector.CurrentItem may not be
> valid.
>
> In the code where you create your button just check for the UserProperty you
> created and if it's true set your button properties to .Enabled = false if
> you want it there but grayed out, or .Visible = false if you don't want it
> shown at all.
>
> There are a number of VSTO samples and C# samples at www.outlookcode.com.
>
> --
> Ken Slovak
> [MVP - Outlook]
>
http://www.slovaktech.com> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
>
http://www.slovaktech.com/products.htm>
>
> "AndersL" <AndersL[ at ]discussions.microsoft.com> wrote in message
> news:73E04FA2-0D3C-480A-B66B-BFA6572701BE[ at ]microsoft.com...
> >I am creating an Outlook 2003 add-in using C# and VSTO second edition. I
> >have
> > created a CommandBarButton, and want to redirect an email to a given email
> > address when the button is clicked. It is of importance that the original
> > subject, content and sender/recievers are kept.
> >
> > I have the button click event up and running, and I have also extracted
> > the
> > selected MailItem.
> >
> > 1) Is there framework support in the Outlook OM for redirecting a MailItem
> > to a given email account, given my criterias above? If there is no direct
> > support for this, does anyone know a workaround? Code examples are much
> > appreciated.
> >
> > 2) When the mail message is redirected, I would like to mark the original
> > message somehow, so the user easily can see that the button has been
> > clicked.
> > I was thinking to set a custom flag, but that could interfere routines for
> > the users that use the normal flagging functionality. Any ideas on how to
> > solve this? Code examples?
> >
> > 3) I also need to prevent that the same email is redirected again by
> > deactivating the button. I picture that the event handler checks the
> > "redirected" flag of the message. Does anyone know what event to handle to
> > catch a change in selection?
> >
> > Thanks in advance!
> >
> > Regards,
> > Anders
> >
>
>