/// <summary>
        ///     The convert to docx.
        /// </summary>
        /// <param name="fullPath">The full path.</param>
        /// <param name="targetLanguage">The target language.</param>
        /// <returns>
        ///     The System.String.
        /// </returns>
        private static string ConvertToDocx(string fullPath, string targetLanguage)
        {
            LoggingManager.LogMessage("Converting the document " + fullPath + " from doc or pdf to docx.");
            object nullvalue = Type.Missing;

            //Microsoft.Office.Interop.Word.Application wordApp = (Microsoft.Office.Interop.Word.Application)
            //Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("000209FF-0000-0000-C000-000000000046")));
            Microsoft.Office.Interop.Word.Application wordApp =
                new Microsoft.Office.Interop.Word.Application
            {
                Visible = false
            };
            object file2 = GetOutputDocumentFullName(fullPath, targetLanguage);

            try
            {
                wordApp.Visible = false;
                object filee = fullPath;
                Microsoft.Office.Interop.Word.Document wordDoc = wordApp.Documents.Open(
                    ref filee,
                    nullvalue,
                    Missing.Value,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue,
                    nullvalue);

                if (fullPath.ToLowerInvariant().EndsWith(".doc"))
                {
                    wordDoc.Convert();
                }

                wordDoc.SaveAs(
                    ref file2,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue,
                    ref nullvalue);
                wordDoc.Close(ref nullvalue, nullvalue, nullvalue);
            }
            finally
            {
                // wordApp.Documents.Close(ref nullvalue, ref nullvalue, ref nullvalue);
                wordApp.Quit(ref nullvalue, ref nullvalue, ref nullvalue);
            }

            LoggingManager.LogMessage("Converted the document " + fullPath + " from doc or pdf to docx.");
            return(file2.ToString());
        }