private void listViewSearchResults_DoubleClick(object sender, EventArgs e) { try { if (listViewSearchResults.SelectedItems.Count > 0) { PowerPoint.Presentation activePresentation = Addin.Application.ActivePresentation; if (null != activePresentation) { Customer selectedCustomer = listViewSearchResults.SelectedItems[0].Tag as Customer; activePresentation.Slides[1].Shapes.AddTextEffect(MsoPresetTextEffect.msoTextEffect9, selectedCustomer.Name, "Arial", 20, MsoTriState.msoTrue, MsoTriState.msoFalse, 10, 150); activePresentation.Dispose(); } } } catch (Exception exception) { MessageBox.Show(this, exception.Message, "An error occured", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void powerApplication_PresentationCloseEvent(NetOffice.PowerPointApi.Presentation Pres) { textBoxEvents.BeginInvoke(_updateDelegate, new object[] { "Event PresentationClose called." }); Pres.Dispose(); }
void powerApplication_AfterNewPresentationEvent(NetOffice.PowerPointApi.Presentation Pres) { _afterNewPresentation = true; Pres.Dispose(); }
void powerApplication_PresentationCloseEvent(NetOffice.PowerPointApi.Presentation Pres) { _presentationClose = true; Pres.Dispose(); }