Warning Pre-Scanning failed to identify the file type, the following messages were generated: Warning Pre-Scanning Error: Unable to open the input file for translation. Please try to re-save the file in the MS Office application.

Hi there,

Is there any other solution to this issue but just resaving doc to docx file format?

Trados Studio task results showing a warning message indicating pre-scanning failed to identify the file type and suggests re-saving the file in MS Office application.

Re-saving to docs is not a big deal if I have 2, 3 .. 10 files..  But may turn time consuming when number of files increase up to dozens and it multiplies x2 as I have to re-save them back to doc format after translation (for initial formatting layout). 



Generated Image Alt-Text
[edited by: Trados AI at 12:26 PM (GMT 0) on 29 Feb 2024]
emoji
  •  

    None that I'm aware if.  But maybe you can batch resave before you work on them?

    You could use a macro to batch save DOC files as DOCX. Below is a VBA (Visual Basic for Applications) code snippet that you could use:

    ```vba
    Sub ConvertDocToDocx()
    Dim strFolder As String, strFile As String, wdDoc As Document
    ' Set the folder and get the first .doc file
    strFolder = "C:\Path\To\Your\Doc\Files\"
    strFile = Dir(strFolder & "*.doc")
    
    ' Loop through each .doc file in the folder
    Do While strFile <> ""
    ' Open the .doc file
    Set wdDoc = Documents.Open(FileName:=strFolder & strFile)
    
    ' Save as .docx
    wdDoc.SaveAs2 FileName:=strFolder & Replace(strFile, ".doc", ".docx"), FileFormat:=wdFormatXMLDocument
    
    ' Close the document
    wdDoc.Close SaveChanges:=wdDoNotSaveChanges
    
    ' Get the next .doc file
    strFile = Dir
    Loop
    End Sub
    ```

    Or if you're comfortable with scripting, you could use PowerShell:

    ```powershell
    $word = New-Object -ComObject Word.Application
    $word.Visible = $false
    Get-ChildItem 'C:\Path\To\Doc\Files\*.doc' | ForEach-Object {
    $doc = $word.Documents.Open($_.FullName)
    $doc.SaveAs([ref]$($_.FullName + "x"), [ref]16) # 16 is the wdFormatXMLDocument enum value for .docx
    $doc.Close()
    }
    $word.Quit()
    ```

    Backup your original files before running any conversion processes to prevent any accidental data loss!

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji