using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.Office.Tools.Ribbon; using System.Net.Mail; namespace AttachmentSolution { public partial class Ribbon1 { private void Ribbon1_Load(object sender, RibbonUIEventArgs e) { } private void Button1_Click(object sender, RibbonControlEventArgs e) { string locationToCreateFolder = "D:/Attachments/"; string folderName = ""; string date = DateTime.Now.ToString("ddd MM.dd.yyyy"); string format = "{0} on {1} At {2}"; folderName = string.Format(format, date, Message.Subject); Directory.CreateDirectory(locationToCreateFolder + folderName); MessageBox.Show("done"); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)