I am working on this Outlook VSTO Add-on, to add an image in the body of the email, but no luck at all for two weeks!!! It works with a normal path like c:\folder but it doesn't work if I want to use the Resources folder inside of the app.
When I run it and click on the button, it crashes and goes to the: document.Application.Selection.InlineShapes.AddPicture(ImagePath);
There is a Ribbon with a button. When user clicks, it should add the email signature in the body.
PLEASE HELP!!!!!!!!!!!!!!!!
        private void button_Click(object sender, RibbonControlEventArgs e) 
    {
        Outlook.Inspector inspector = Globals.ThisAddIn.Application.ActiveInspector();
        Word.Document document = inspector.WordEditor;
       string ImagePath = @"\Resources\Picture.jpg";
        if (document.Application.Selection == null)
        {
            MessageBox.Show("Please select the email body");
        }
        else
        {
            document.Application.Selection.InlineShapes.AddPicture(ImagePath);
        }
    }
 
    