Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Dec 2010
    Posts
    2

    Default Can BeyondCompare do .DOC files?

    Can BeyoneCompare be used to compare MS Office documents like .DOC, .PPT?

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,366

    Default

    Hello,

    Yes. Beyond Compare can compare Word files (.doc and .docx), by using a conversion process and comparing the plain text of the files. You can test this with our fully featured trial:
    http://www.scootersoftware.com/download.php

    .ppt is not a supported format, but we do have an older BC2 rule that could be modified to work in BC3. I would suggest working with .doc first, and then coming back to .ppt later.
    http://www.scootersoftware.com/downl...z=kb_morerules
    Aaron P Scooter Software

  3. #3
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,366

    Default

    Correction: We have updated the rule to BC3 as well. It is available here:
    http://www.scootersoftware.com/downl...kb_moreformats
    Aaron P Scooter Software

  4. #4
    Join Date
    Dec 2010
    Posts
    2

    Default How to use the rule

    Im on Windows XP Pro with MS Office 2007.

    I downloaded the .bcpkg for PPT files. I launched the icon and it said it was "importing" Then I launched BeyondCompare 3.2.2 But I don't see PPT as a file choice in left menu.

    How do I use these rules in BC?

    Thanks, Aaron, for your help. BC seems to be a fantastic tool and I'm just now digging into it.

    --dave

  5. #5
    Join Date
    Oct 2007
    Location
    Hannover, Germany
    Posts
    356

    Default

    Go to menu Tools/File Formats. This dialog should show the ppt-format on top of the list with a black mask "*.ppt;*.pptx" in the second column. If you didn't change BCs default settings ppt-files should automatically be detected and converted on opening.

    If you don't see the ppt-format in the list the import failed (but I have never seen this).

    There are some other settings to prevent automatic detection, but they shouldn't apply in your case.

    Greetings Lutz

    PS: BC is the BEST! (for me since BC1.7 of 1999)

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,366

    Default

    Thanks, Lutz.

    In addition, File Formats are additional rules for each type of current comparsion/session type. So you may have a new File Format for the Text Compare, MP3 Compare, Picture Compare, etc.

    The Power Point file format is a Text Compare File Format. It is an additional rule found in the File Formats dialog, associated with the Text Compare session type.
    Aaron P Scooter Software

  7. #7
    Join Date
    Oct 2011
    Posts
    1

    Default

    Hi,

    I do not see the .doc format in the available Windows formats at this page..
    http://www.scootersoftware.com/downl...oreformats_win

    Do you have one that works for BC Version 3?

    Thanks,

    Terry

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    Microsoft Word .doc file support is built-in to Beyond Compare 3, no additional download is required. To compare .doc files, open them in the Text Compare.
    Chris K Scooter Software

  9. #9
    Join Date
    Jan 2012
    Posts
    22

    Default How about for Linux?

    Hi guys,

    How about for Linux users that want to diff doc files? I'm not sure if anything is available yet. If there is, let me know, and I'll give up my current effort

    Ok, my current effort, not working yet, anyone know how I can get this working?

    My attempt
    • Make a macro for OpenOffice to save out the doc file as an html file
    • Add a File-Format rule to let BC3 run this macro from the command-line


    Here's my macro:
    Code:
    REM  *****  BASIC  *****
    
    ' Save document as Html file.
    Sub SaveAsHTML( cFile, cOutFile )
       'cFile = "/home/gurce/games/iTable/DisplayBuild/table_sign_protocol.doc"
       'cOutFile = "/home/gurce/games/iTable/DisplayBuild/table_sign_protocol.html"
       cURL = ConvertToURL( cFile )
       ' Open the document. Just blindly assume that the document
       ' is of a type that OOo will correctly recognize and open
       ' without specifying an import filter.
       oDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, Array(MakePropertyValue( "Hidden", True )))
    
       ' cFile = Left( cFile, Len( cFile ) - 4 ) + ".html"
       cURL = ConvertToURL( cOutFile )
       
       ' Save the document using a filter.   
       oDoc.storeToURL( cURL, Array(_
                MakePropertyValue( "FilterName", "HTML (StarWriter)" ),)
       
       oDoc.close( True )
    End Sub
    
    Function MakePropertyValue( Optional cName As String, Optional uValue ) _
       As com.sun.star.beans.PropertyValue
       Dim oPropertyValue As New com.sun.star.beans.PropertyValue
       If Not IsMissing( cName ) Then
          oPropertyValue.Name = cName
       EndIf
       If Not IsMissing( uValue ) Then
          oPropertyValue.Value = uValue
       EndIf
       MakePropertyValue() = oPropertyValue
    End Function
    Here's my BC3 doc/docx file-format rule:
    Code:
    soffice --invisible "macro:///Standard.MyMacros.SaveAsHtml(%s,%t)"
    Doesn't seem to work yet for me. BC3 opens up with both the old/new doc files as empty.

    I'm fairly sure this macro works, as when I run it from the console, it does generate the html file.
    Code:
    soffice --invisible "macro:///Standard.MyMacros.SaveAsHtml($PWD/table_sign_protocol.doc,$PWD/table_sign_protocol.html)"
    Any ideas how I can tweak this to make this method work for BC3-Linux?

  10. #10
    Join Date
    Jan 2012
    Posts
    22

    Default

    Ok, figured something out, I made a little bash script to call the macro, then add a BC3 rule that will call the bash-script.

    Eg. my "bc_word_to_html" bash script is as follows:
    Code:
    #!/bin/bash
    soffice --invisible "macro:///Standard.MyMacros.SaveAsHtml($1,$2)"
    Then my file-format rule in BC3 is:
    Code:
    bc_word_to_html "%s" "%t"
    This seems to work, although the html is densely packed with too many tags and attributes.

    Perhaps I'd be better off saving it as pure text, although part of me thought it would make for an interesting diff if a minimal amount of html tags crept through. Eg, for tables, I find it hard to comprehend diffs of tables when a word doc is flattened into a text file, so I was hoping html might make diff'ing of doc tables easier to follow.

    Ah well, nevermind... Maybe I could write a little app to filter out some bulkier tags, particularly lengthy attributes in tags, then feed this result into BC3, and then this idea might work out...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •