Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2006, 04:31 PM
Authorized User
 
Join Date: Jun 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to connect2sandep
Default how to compare two word documents using full text

can we use full text search and mining algorithms to comapre two word or text documents to find out if they are similar
please help.
thaks for reading

 
Old October 7th, 2008, 07:26 AM
Registered User
 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to nike2u2000
Default

Hi!

I'm looking for a solution too which can help me to compare two word documents using C#. For the moment I compare the two documents only by strings(I mean, only by the text content) but they could also have different styles, font sizes, images... Can we compare those 2 docs by bytes? It will be OK?

        /// <summary>
        /// Converts the content of a Word document to a string.
        /// </summary>
        /// <param name="document"></param>
        /// <returns></returns>
        public static string ConvertDocToString(Word.Document document)
        {
            string myLocalString = String.Empty;

            try
            {
                myLocalString = document.Content.Text;
            }
            catch (Exception ex)
            {
                OfficeLibraryUtils.logger.Error(ex);
                OfficeLibraryUtils.HandleException(ex);
            }

            return myLocalString;
        }

        public static bool AreTheSame(string string1, string string2)
        {
            // If CompareTo returns diff from 0, then the 2 strings are different.
            return (string1.CompareTo(string2) == 0);
        }

Thanks in advance,
Nicu






Similar Threads
Thread Thread Starter Forum Replies Last Post
compare two xml documents bcogney XSLT 1 October 30th, 2006 03:33 PM
how to use word and pdf filter in full text search connect2sandep SQL Server 2005 0 February 9th, 2006 02:00 PM
Inserting Word Documents into Access showie Access VBA 4 December 14th, 2005 02:02 PM
ASP and word documents Nicky2k Classic ASP Databases 1 August 11th, 2005 04:11 PM
comparision of two word documents anuradhad VB How-To 1 July 24th, 2004 04:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.