Come è possibile ottenere l'immagine di un contatto da Outlook e salvarlo in un file?Come ottenere a livello di codice un'immagine di un contatto in Outlook 2010?
Grazie!
Come è possibile ottenere l'immagine di un contatto da Outlook e salvarlo in un file?Come ottenere a livello di codice un'immagine di un contatto in Outlook 2010?
Grazie!
E 'anche un buon esempio di come a fare questo: http://www.scip.be/index.php?Page=ArticlesNET07
ho trovato questo link: http://www.c-sharpcorner.com/forums/ShowMessages.aspx?ThreadID=70283
Le altre risposte qui sono buoni, ma c'è anche un'alternativa:
Attachment.GetTemporaryFilePath Method (Outlook)
Attachment.SaveAsFile Method (Outlook)
Per r etrieve il percorso.
var attachment = contact.Attachments["ContactPicture.jpg"] as Attachment;
var path = attachment.GetTemporaryFilePath();
Per salvare il file.
var attachment = contact.Attachments["ContactPicture.jpg"] as Attachment;
var path = attachment.SaveAsFile(savePath);