//slide change function
        void Application_SlideSelectionChanged(PowerPoint.SlideRange SldRange)
        {
            try
               {

                if (SldRange.Equals(null))
                {
                    if(currentlyViewed=="add"){
                        try
                        {
                            addDictionaries.showSlideNumber(SldRange.SlideID.ToString(), SldRange.SlideNumber.ToString());

                        }
                        catch (System.AccessViolationException ex) { }

                    }
                        else if (currentlyViewed=="update")
                        {
                             updateDictionaries.showSlideNumber(SldRange.SlideID.ToString(), SldRange.SlideNumber.ToString());
                        }

                }
               }
            catch (AccessViolationException avEx)
            {

               }
               catch (Exception ex)
               {

            }
        }