Using .NET addins in Outlook XP

D

Dan Fergus

Don't know if this is the bets place to ask, but here goes.

I've written an addin for Outlook XP ising C# and .NET and it works great!.
My only problem is that I want to put a picture on the toolbar, instead of a
caption. The toolbar wants a IPictureDisp but .NET is an Image object.
I've seen some references to AxHost but then method I see called is not in
the AxHost object on my box.

Any ideas or pointer would be welcomed.

Dan Fergus
 
T

TR

This is how you can do it in C#:

public class PicConversion//: System.Windows.Forms.AxHost
{
public static stdole.IPictureDisp
GetIPictureDispFromImage(System.Drawing.Image img)
{
return
(stdole.IPictureDisp)typeof
(System.Windows.Forms.AxHost).InvokeMember(
"GetIPictureDispFromPicture",
BindingFlags.InvokeMethod |
BindingFlags.NonPublic |
BindingFlags.Static, null, null, new object[] { img });

}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top