Ekin ayrıntılarını almak için seçilen ek için bir Outlook eklentisi oluşturdum. ve Outlook 2010'da gayet iyi çalışıyor. Ama bunu 2016 için oluşturduğumda, null olur. Aşağıda Outlook 2016 eklentisi AttachmentSelection Sorun
ThisAddIn.cs içinde kod şudur: -private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
System.Reflection.Assembly assemblyInfo = System.Reflection.Assembly.GetExecutingAssembly();
Uri uriCodeBase = new Uri(assemblyInfo.CodeBase);
string Location = Path.GetDirectoryName(uriCodeBase.LocalPath.ToString());
var path = Location.Split(new string[] { "bin" }, StringSplitOptions.RemoveEmptyEntries);
var rootDir = path[0].ToString();
var forPermissionsRootDirectory = Path.GetDirectoryName(rootDir);
SetPermissions(forPermissionsRootDirectory);
app = this.Application;
app.AttachmentContextMenuDisplay += new Outlook.ApplicationEvents_11_AttachmentContextMenuDisplayEventHandler(app_AttachmentContextMenuDisplay);//attach Attachment context Menu Event//
}
void app_AttachmentContextMenuDisplay(Office.CommandBar CommandBar, Outlook.AttachmentSelection selection)
{
selectedAttachment = selection;
RibbonUI.InvalidateControlMso("ContextMenuAttachments");//will get XML file data//
}
ve bu AttachmentContextMenu.cs içinde kod şudur: - seçiminde
public void OnOpenMyMotionCalendarButtonClick(Office.IRibbonControl control)
{
Outlook.AttachmentSelection selection = ThisAddIn.selectedAttachment;
if ((selection.Count > 0))
{
//My further working
}
}
, her zaman görünümün 2016 için boş olduğu Lütfen ne yapmanız gerektiğini önerin:
Saygılarımızla, Ariel
Bunun için bir düzeltme yaptınız mı? – Pooran
sebebini buldunuz mu? Bu çözüldü? – Stavm