Draki01
Draki01

Reputation: 1

Report junk function custom button Outlook Add-Ins

Im pretty new to Outlook Add-Ins and Im currently working to create a custom Button that will mark selected Email as junk. I want to use the function that outlook already have to report junk and my custom button will just trigger this function. Is it possible to trigger this function?

Thank you

I was searching everywhere but didnt find a solution

Upvotes: 0

Views: 64

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49395

I want to use the function that outlook already have to report junk and my custom button will just trigger this function.

The Outlook object model doesn't provide anything for that. You can move the item to the Junk Emails folder programmatically by using the Move method.

Also you may try to execute the built-in ribbon button programmatically by using the CommandBars.ExecuteMso method which executes the control identified by the idMso parameter. This method is useful in cases where there is no object model for a particular command. Works on controls that are built-in buttons, toggleButtons, and splitButtons.

Upvotes: 0

Related Questions