Attaching file in MS CRM through coding ,
Many times we needs to add different documents as an attachments to note, thus thought to share it ..
I explored, PDF, Word, Excel, Text file only, but i belive same code can be useful for other types of documents as well. Thus only Text file and PDF file complete function ahs been provided as an example and for rest only change of that document. That change belongs to “mimetype” only, rest part is same.
Word file : only change mimetype in below PDF code
// Set the type of attachment note.MimeType = @"application\ms-word";