internal static void RefreshBibliography()
        {
            try
            {
                string last_style_filename = GetLastStyleFilename();
                if (null != last_style_filename)
                {
                    CSLProcessor.RefreshDocument(WordConnector.Instance, last_style_filename, null);
                }
            }

            catch (Exception ex)
            {
                Logging.Error(ex, "Exception while refreshing bibliography.");
                MessageBoxes.Error("There has been a problem while trying to add the citation.  Please check that Microsoft Word is running.\n\nIf the problem persists, perhaps open InCite from the Start Page as it may offer more details about the problem.");
            }
        }
        private void ButtonRefresh_Click(object sender, RoutedEventArgs e)
        {
            FeatureTrackingManager.Instance.UseFeature(Features.InCite_Refresh);

            // Check that they have picked the two important things...
            if (!CheckThatLibraryAndStyleHaveBeenSelected())
            {
                return;
            }

            string style_filename = GetStyleFilename();

            if (null != style_filename)
            {
                CSLProcessor.RefreshDocument(WordConnector.Instance, style_filename, DefaultLibrary);
            }

            e.Handled = true;
        }