Direkt zum Inhalt

Wie konvertiere ich Dateien im DOC-Format in Word in DOCX?

Angenommen, Sie haben Word-Dokumente im Format 97-2003 erhalten. Wie können Sie alle diese Dokumente im DOC-Format gleichzeitig in das DOCX-Format konvertieren? Dieser Artikel zeigt Ihnen zwei Methoden zur Lösung dieses Problems.

Batch-Konvertierung von Dateien im DOC-Format in DOCX mit VBA-Code
Batch-Konvertierung von Dateien im DOC-Format mit Kutools for Word in DOCX


Batch-Konvertierung von Dateien im DOC-Format in DOCX mit VBA-Code

In diesem Abschnitt wird der VBA-Code zum gleichzeitigen Konvertieren aller Dokumente im DOC-Format in einem angegebenen Ordner in DOCX-Dokumente angezeigt. Bitte gehen Sie wie folgt vor.

1. Bitte sammeln Sie alle Dokumente im DOC-Format, die Sie in DOCX konvertieren möchten, in einem bestimmten Ordner.

2. Drücken Sie die Taste Andere + F11 Schlüssel zum Öffnen des Microsoft Visual Basic für Applikationen Fenster.

3. Klicken Sie im Fenster auf Insert > Modul. Kopieren Sie dann den folgenden VBA-Code in das Modulfenster.

VBA-Code: Batch-Konvertierung aller Dokumente im DOC-Format in DOCX in einem bestimmten Ordner

Sub ConvertDocToDocx()
'Updated by ExtendOffice 20181128
    Dim xDlg As FileDialog
    Dim xFolder As Variant
    Dim xFileName As String
    Application.ScreenUpdating = False
    Set xDlg = Application.FileDialog(msoFileDialogFolderPicker)
    If xDlg.Show <> -1 Then Exit Sub
    xFolder = xDlg.SelectedItems(1) + "\"
    xFileName = Dir(xFolder & "*.doc", vbNormal)
    While xFileName <> ""
        Documents.Open FileName:=xFolder & xFileName, _
            ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
            PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
            WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
            wdOpenFormatAuto, XMLTransform:=""
        ActiveDocument.SaveAs xFolder & Replace(xFileName, "doc", "docx"), wdFormatDocumentDefault
        ActiveDocument.Close
        xFileName = Dir()
    Wend
    Application.ScreenUpdating = True
End Sub

4. Drücken Sie die Taste F5 Schlüssel zum Ausführen des Codes. In der Eröffnung Entdecken Wählen Sie im Fenster den Ordner mit den Dokumenten im DOC-Format aus und klicken Sie auf OK. Siehe Screenshot:

Anschließend werden alle Dokumente im DOC-Format sofort in DOCX-Dokumente konvertiert (siehe Abbildung unten).


Batch-Konvertierung von Dateien im DOC-Format mit Kutools for Word in DOCX

In diesem Abschnitt wird ein praktisches Dienstprogramm empfohlen. Mit dem Doc / Docx Nutzen von Kutools for Wordkönnen Sie problemlos alle Dokumente im DOC-Format in einem Ordner in DOCX-Dokumente konvertieren. Bitte versuchen Sie es wie folgt.

Kutools for Word : Mit mehr als 100 praktischen Word-Add-Ins, Kostenlos zum Ausprobieren ohne Einschränkung 60 Tage.

1. Bitte sammeln Sie alle Dokumente im DOC-Format in einem bestimmten Ordner und klicken Sie dann auf Kutoolen Plus > Doc / Docx. Siehe Screenshot:

2. In dem Dokumentformatkonverter Dialogfeld müssen Sie wie folgt vorgehen:

2.1) Wählen Sie den Ordner aus, der Dokumente im DOC-Format enthält Quelldateiordner Sektion;
2.2) Wählen Sie Konvertieren Sie doc in docx von dem Format konvertieren Dropdown-Liste;
2.3) Standardmäßig ist die Zielpfad wie Quelle Kontrollkästchen ist aktiviert. Wenn Sie alle konvertierten DOCX-Dokumente in demselben Ordner ablegen möchten, lassen Sie diese Option einfach ausgewählt.
Wenn Sie die DOCX-Dokumente und die DOC-Quelldokumente trennen möchten, deaktivieren Sie bitte das Kontrollkästchen Zielpfad wie Quelle Wählen Sie einen neuen Ordner aus, um die DOCX-Dokumente im zu speichern Sparen Sie bis zu Box;
2.4) Klicken Sie auf Startseite Taste. Siehe Screenshot:

3. Anschließend wird ein Dialogfeld angezeigt, in dem Sie erfahren, wie viele Dokumente erfolgreich konvertiert wurden. Klicken Sie auf OK Taste und schließen Sie die Dokumentformatkonverter Fenster.

Jetzt werden alle Dokumente im DOC-Format in DOCX-Dateien konvertiert. Siehe Screenshot:

Wenn Sie dieses Dienstprogramm kostenlos testen möchten, gehen Sie zu Laden Sie die Software kostenlos herunter Wenden Sie zuerst die Operation gemäß den obigen Schritten an.


Beste Office-Produktivitätstools

Kutools for Outlook - Über 100 leistungsstarke Funktionen zur Optimierung Ihres Outlooks

🤖 KI-Mail-Assistent: Sofortige Profi-E-Mails mit KI-Magie – geniale Antworten mit einem Klick, perfekter Ton, mehrsprachige Beherrschung. Verwandeln Sie den E-Mail-Versand mühelos! ...

📧 E-Mail Automation: Abwesenheit (verfügbar für POP und IMAP)  /  Planen Sie das Senden von E-Mails  /  Automatisches CC/BCC nach Regeln beim E-Mail-Versand  /  Automatische Weiterleitung (erweiterte Regeln)   /  Begrüßung automatisch hinzufügen   /  Teilen Sie E-Mails mit mehreren Empfängern automatisch in einzelne Nachrichten auf ...

📨 E-Mail-Management: E-Mails einfach abrufen  /  Blockieren Sie betrügerische E-Mails nach Betreff und anderen  /  Doppelte E-Mails löschen  /  Erweiterte Suche  /  Ordner konsolidieren ...

📁 Anhänge ProBatch speichern  /  Stapeltrennung  /  Stapelkomprimierung  /  Automatisches Speichern   /  Automatische Trennung  /  Automatische Komprimierung ...

???? Schnittstellenmagie: 😊Mehr hübsche und coole Emojis   /  Steigern Sie Ihre Outlook-Produktivität mit Registerkartenansichten  /  Ausblick minimieren statt schließen ...

👍 Wunder mit einem Klick: Allen mit eingehenden Anhängen antworten  /   Anti-Phishing-E-Mails  /  🕘Zeitzone des Absenders anzeigen ...

👩🏼‍🤝‍👩🏻 Kontakte und Kalender: Fügen Sie Kontakte aus ausgewählten E-Mails im Stapel hinzu  /  Teilen Sie eine Kontaktgruppe in einzelne Gruppen auf  /  Geburtstagserinnerungen entfernen ...

Auf über 100 Eigenschaften Warten Sie auf Ihre Erkundung! Klicken Sie hier, um mehr zu erfahren.

 

 

Comments (14)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Dobrý den,
já bych potřeboval, ale VBA script který by fungoval včetně podsložek. Umíte někdo prosím upravit i tento skript? Děkuji.

ENG:
Good day,
I would need a VBA script that would work including subfolders. Can someone please edit this script as well? Thank you.
This comment was minimized by the moderator on the site
Hi Daniel Beneš,
To include subfolders, please try the following VBA code.
After adding the code, go to the Tools tab, click References, in the opening References - Project dialog box, check the Microsoft Scripting Runtime box, and then click the OK button to save the changes. See the following screenshot:
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/check-scripting_runtime.png
After that, press the F5 key to run the code.

Sub ConvertDocToDocx()
'Updated by ExtendOffice 20221124
  Dim xDlg As FileDialog
  Dim xFldPath As Variant
  Dim xFileName As String
  On Error Resume Next
  Application.ScreenUpdating = False
  Set xDlg = Application.FileDialog(msoFileDialogFolderPicker)
  If xDlg.Show <> -1 Then Exit Sub
  xFldPath = xDlg.SelectedItems(1) + "\"
  Call ListAllFiles(xFldPath)
  Application.ScreenUpdating = True
End Sub

Function ListAllFiles(FldPath)
  Dim xFSO As FileSystemObject
  Dim xFolder As Folder
  Dim xSubFolder As Folder
  Dim xNewName As String
  On Error Resume Next
  xFileName = Dir(FldPath & "*.doc", vbNormal)
  While xFileName <> ""
    xNewName = VBA.Left$(xFileName, VBA.InStrRev(xFileName, "doc") - 1) & "docx"
    Documents.Open FileName:=FldPath & xFileName, _
        ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
        PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
        WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
        wdOpenFormatAuto, XMLTransform:=""
    ActiveDocument.SaveAs FldPath & xNewName, wdFormatDocumentDefault
    ActiveDocument.Close
    xFileName = Dir()
  Wend
  Set xFSO = CreateObject("Scripting.FileSystemObject")
  Set xFolder = xFSO.GetFolder(FldPath)
  For Each xSubFolder In xFolder.SubFolders
    Call ListAllFiles(xSubFolder.Path + "\")
  Next
  Set xFSO = Nothing
  Set xFolder = Nothing
End Function
This comment was minimized by the moderator on the site
Nice tool but I got the problem, that I can't convert DOC files (written in capitals!) into docx files.
It works with doc files.
This comment was minimized by the moderator on the site
Hi,
The following code can help to convert both doc. and DOC. files into docx files. Please give it a try. Thanks for your feedback.

Sub ConvertDocToDocx()
'Updated by ExtendOffice 20220506
    Dim xDlg As FileDialog
    Dim xFolder As Variant
    Dim xFileName As String
    Application.ScreenUpdating = False
    Set xDlg = Application.FileDialog(msoFileDialogFolderPicker)
    If xDlg.Show <> -1 Then Exit Sub
    xFolder = xDlg.SelectedItems(1) + "\"
    xFileName = Dir(xFolder & "*.doc", vbNormal)
    While xFileName <> ""
        Documents.Open FileName:=xFolder & xFileName, _
            ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
            PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
            WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
            wdOpenFormatAuto, XMLTransform:=""
        ActiveDocument.SaveAs xFolder & Replace(VBA.LCase(xFileName), "doc", "docx"), wdFormatDocumentDefault
        ActiveDocument.Close
        xFileName = Dir()
    Wend
    Application.ScreenUpdating = True
End Sub
This comment was minimized by the moderator on the site
Thanks for sharing
This comment was minimized by the moderator on the site
best graphic design company in india
Designing is a craft of communicating words as articulations. Visuals matter more than words in the advanced field.
The experts in the designing business recommend that illustrations are simpler to recall than words,
and that is the reason Website designing and Graphics play an imperative job.

This comment was minimized by the moderator on the site
Thanks for sharing this useful information.
This comment was minimized by the moderator on the site
This is really insightful article , found it very helpful and informational
This comment was minimized by the moderator on the site
HelloNice post .. Keep sharing.Thank You
This comment was minimized by the moderator on the site
Hello sir,
I love with this post.I really appreciate for this website.Your information is so good and valuable.Lovable idea and concept for sharing this website.
This is an amazing website.This post is nice.
Thanks for sharing
This comment was minimized by the moderator on the site
Hi....Hi, This blog content very technical information, it is on of the best blog i have got. Very interesting and describe in a very easy way.
This comment was minimized by the moderator on the site
Hello,
I am glad to find this useful information Thanks for sharing this amazing article.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations