Ga naar hoofdinhoud

Hoe converteer ik bestanden in .doc-formaat naar .docx in Word?

Stel dat u Word-documenten in de indeling 97-2003 hebt ontvangen, hoe kunt u dan al deze documenten in .doc-indeling in één keer in één keer converteren naar .docx-indeling? Dit artikel laat u twee methoden zien om dit probleem op te lossen.

Batch converteer bestanden in .doc-formaat naar .docx met VBA-code
Batch converteer bestanden in .doc-formaat naar .docx met Kutools voor Word


Batch converteer bestanden in .doc-formaat naar .docx met VBA-code

In deze sectie wordt de VBA-code getoond om alle documenten in .doc-indeling in een opgegeven map in één keer naar .docx-documenten te converteren. Ga als volgt te werk.

1. Verzamel alle documenten in .doc-indeling die u naar .docx wilt converteren in een opgegeven map.

2. druk de anders + F11 sleutel om het te openen Microsoft Visual Basic voor toepassingen venster.

3. Klik in het venster op Invoegen > Module. Kopieer vervolgens onderstaande VBA-code naar het modulevenster.

VBA-code: Batch converteer alle documenten in .doc-indeling naar .docx in een bepaalde map

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. druk de F5 sleutel om de code uit te voeren. In de opening Blader venster, selecteer de map met de documenten in .doc-indeling en klik op OK. Zie screenshot:

Vervolgens worden alle documenten in .doc-formaat onmiddellijk geconverteerd naar .docx-documenten, zoals hieronder wordt getoond.


Batch converteer bestanden in .doc-formaat naar .docx met Kutools voor Word

In dit gedeelte wordt een handig hulpprogramma aanbevolen. Met de Doc / Docx nut van Kutools for Word, kunt u eenvoudig alle documenten in .doc-indeling in een map converteren naar .docx-documenten. Probeer het als volgt.

Kutools for Word : Met meer dan 100 handige Word-invoegtoepassingen, gratis te proberen zonder beperking in 60 dagen.

1. Verzamel alle documenten in .doc-indeling in een opgegeven map en klik op Koetools Plus > Doc / Docx. Zie screenshot:

2. In de Documentformaatconvertor dialoogvenster, moet u het volgende doen:

2.1) Selecteer de map met documenten in .doc-indeling in de Bronbestandmap sectie;
2.2) Selecteer Converteer doc naar docx van het Formaat converteren keuzelijst;
2.3) Standaard is het Bestemmingspad hetzelfde als bron vakje is aangevinkt. Als u alle geconverteerde .docx-documenten in dezelfde map wilt plaatsen, houdt u deze optie geselecteerd;
Als u de .docx-documenten en de .doc-brondocumenten wilt scheiden, schakelt u het selectievakje uit Bestemmingspad hetzelfde als bron box en selecteer een nieuwe map om de .docx-documenten in het Opslaan in doos;
2.4) Klik op de Start knop. Zie screenshot:

3. Vervolgens verschijnt er een dialoogvenster waarin u kunt zien hoeveel documenten met succes zijn geconverteerd. Klik op OK knop en sluit het Documentformaatconvertor venster.

Nu worden alle documenten in .doc-formaat geconverteerd naar .docx-bestanden. Zie screenshot:

Als u een gratis proefversie van dit hulpprogramma wilt, gaat u naar gratis download de software eerst, en ga dan de bewerking toepassen volgens bovenstaande stappen.


Beste Office-productiviteitstools

Kutools for Outlook - Meer dan 100 krachtige functies om uw Outlook een boost te geven

🤖 AI Mail-assistent: Directe professionele e-mails met AI-magie: met één klik geniale antwoorden, perfecte toon, meertalige beheersing. Transformeer e-mailen moeiteloos! ...

???? Email Automation: Niet aanwezig (beschikbaar voor POP en IMAP)  /  Plan het verzenden van e-mails  /  Automatische CC/BCC volgens regels bij het verzenden van e-mail  /  Automatisch doorsturen (geavanceerde regels)   /  Begroeting automatisch toevoegen   /  Splits e-mails van meerdere ontvangers automatisch op in individuele berichten ...

📨 email management: Gemakkelijk e-mails herinneren  /  Blokkeer zwendel-e-mails van onderwerpen en anderen  /  Verwijder dubbele e-mails  /  Uitgebreid Zoeken  /  Consolideer mappen ...

📁 Bijlagen ProBatch opslaan  /  Batch losmaken  /  Batchcompressie  /  Automatisch opslaan   /  Automatisch loskoppelen  /  Automatisch comprimeren ...

???? Interface-magie: 😊Meer mooie en coole emoji's   /  Verhoog uw Outlook-productiviteit met weergaven met tabbladen  /  Minimaliseer Outlook in plaats van te sluiten ...

???? Wonderen met één klik: Beantwoord iedereen met inkomende bijlagen  /   Antiphishing-e-mails  /  🕘Toon de tijdzone van de afzender ...

👩🏼‍🤝‍👩🏻 Contacten en agenda: Batchcontacten toevoegen uit geselecteerde e-mails  /  Splits een contactgroep in individuele groepen  /  Verwijder verjaardagsherinneringen ...

Over 100 Eigenschappen Wacht op je verkenning! Klik hier om meer te ontdekken.

 

 

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