我需要将我的图像(我之前存储在剪贴板中)粘贴到电子邮件正文中。我该怎么做?
我SendKeys.Send("^v");
在新邮件窗口打开后尝试过,但没有用。
有没有办法将图像直接放入oMailItem.Body = "";
?
private void mailsenden() // Versendet die E-Mail
{
Bitmap bmp = new Bitmap(PanelErstmeldung.Width, PanelErstmeldung.Height);
PanelErstmeldung.DrawToBitmap(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
Clipboard.SetDataObject(bmp);
Outlook.Application oApp = new Outlook.Application();
_MailItem oMailItem = (Outlook._MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
oMailItem.Subject = "Betriebsstörung im Bereich "+ comboBox1.SelectedItem;
oMailItem.To = "test@test.com";
oMailItem.CC = "test2@test2.com";
oMailItem.Body = ""; // PASTE THE BITMAP bmp HERE in the Body
oMailItem.Display(true); // Or CTRL+V it here in the opend Window
}