Skip to main content

Conas baisc comhaid formáid .doc a thiontú go .docx i Word?

Má ghlactar leis go bhfuair tú roinnt doiciméad Word i bhformáid 97-2003, conas is féidir leat na cáipéisí formáide .doc seo go léir a thiontú go formáid .docx ag an am céanna? Taispeánfaidh an t-alt seo dhá mhodh duit chun an fhadhb seo a réiteach.

Baisc comhaid formáid .doc a thiontú go .docx le cód VBA
Baisc comhaid formáid .doc a thiontú go .docx le Kutools for Word


Baisc comhaid formáid .doc a thiontú go .docx le cód VBA

Taispeánfaidh an chuid seo duit an cód VBA chun gach doiciméad formáide .doc a thiontú i bhfillteán sonraithe go doiciméid .docx ag an am céanna. Déan mar a leanas le do thoil.

1. Bailigh gach doiciméad formáide .doc a athróidh tú go .docx i bhfillteán sonraithe.

2. Brúigh an Eile + F11 eochair chun an Microsoft Visual Basic d’Fheidhmchláir fhuinneog.

3. Sa fhuinneog, cliceáil Ionsáigh > Modúil. Ansin cóipeáil thíos cód VBA isteach i bhfuinneog an Mhodúil.

Cód VBA: Baisc gach doiciméad formáid .doc a thiontú go .docx i bhfillteán áirithe

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. Brúigh an F5 eochair chun an cód a rith. San oscailt Brabhsáil fuinneog, roghnaigh an fillteán ina bhfuil na cáipéisí formáide .doc agus cliceáil OK. Féach an pictiúr:

Ansin athraítear gach doiciméad formáid .doc go cáipéisí .docx láithreach mar a thaispeántar thíos an pictiúr.


Baisc comhaid formáid .doc a thiontú go .docx le Kutools for Word

Molfar fóntais áisiúil sa chuid seo. Leis an Doc / Docx fóntais de Kutools le haghaidh Word, is féidir leat gach doiciméad formáide .doc i bhfillteán a thiontú go cáipéisí .docx go héasca. Bain triail as mar seo a leanas.

Kutools le haghaidh Word : Le níos mó ná 100 breiseán áisiúil Word, saor chun iarracht a dhéanamh gan aon teorainn i 60.

1. Bailigh gach doiciméad formáide .doc i bhfillteán sonraithe, ansin cliceáil Kutools Plus > Doc / Docx. Féach an pictiúr:

2. Sa Tiontaire Formáid Doiciméid bosca dialóige, ní mór duit a dhéanamh mar a leanas:

2.1) Roghnaigh an fillteán ina bhfuil cáipéisí formáide .doc sa Fillteán comhad foinse alt;
2.2) Roghnaigh Tiontaigh doc go docx ó na Tiontaigh Formáid liosta anuas;
2.3) De réir réamhshocraithe, déanann an Cosán ceann scríbe mar an gcéanna leis an bhfoinse seiceáiltear bosca. Más mian leat gach doiciméad .docx tiontaithe a chur san fhillteán céanna, coinnigh an rogha seo roghnaithe;
Más mian leat na doiciméid .docx agus na doiciméid foinse .doc a scaradh, dícheangail na Cosán ceann scríbe mar an gcéanna leis an bhfoinse bosca, agus roghnaigh fillteán nua chun na doiciméid .docx a shábháil sa Sábháil bosca;
2.4) Cliceáil ar an Tòisich cnaipe. Féach an pictiúr:

3. Ansin tagann bosca dialóige suas chun a insint duit cé mhéad doiciméad a tiontaíodh go rathúil, cliceáil an OK cnaipe agus dún an Tiontaire Formáid Doiciméid fhuinneog.

Anois déantar gach doiciméad formáide .doc a thiontú go comhaid .docx. Féach an pictiúr:

Más mian leat triail saor in aisce a bhaint as an bhfóntas seo, téigh chuig íoslódáil saor in aisce na bogearraí ar dtús, agus ansin téigh chun an oibríocht a chur i bhfeidhm de réir na gcéimeanna thuas.


Uirlisí Táirgiúlachta Oifige is Fearr

Kutools le haghaidh Outlook - Níos mó ná 100 Gnéithe cumhachtacha chun do Outlook a shárú

🤖 Cúntóir Ríomhphoist AI: Ríomhphoist pro toirt le draíocht AI - aon-cliceáil chun freagraí genius, ton foirfe, máistreacht ilteangach. Trasfhoirmigh ríomhphost gan stró! ...

📧 Uathoibriú Ríomhphoist: As Oifig (Ar fáil do POP agus IMAP)  /  Sceideal Seol Ríomhphoist  /  Auto CC/BCC de réir Rialacha Agus Ríomhphost á Sheoladh  /  Auto Ar Aghaidh (Ardrialacha)   /  Beannacht Auto Cuir leis   /  Scoilt Ríomhphoist Ilfhaighteoirí go huathoibríoch i dTeachtaireachtaí Aonair ...

📨 Bainistíocht Ríomhphost: Ríomhphoist a Athghairm go héasca  /  Bloc Ríomhphoist Scam ag Ábhair agus Daoine Eile  /  Scrios Ríomhphoist Dúblacha  /  Cuardach Casta  /  Comhdhlúthaigh Fillteáin ...

📁 Ceangaltáin ProSábháil Baisc  /  Baisc Dícheangail  /  Comhbhrú Baisc  /  Auto Sábháil   /  Auto Dícheangail  /  Comhbhrúite Auto ...

🌟 Draíocht Chomhéadain: 😊Níos mó Emojis Pretty and Cool   /  Treisiú Do Tháirgiúlacht Outlook le Radhairc Tabbed  /  Íoslaghdaigh Outlook In ionad Deiridh ...

???? Wonders aon-cliceáil: Freagair Gach Duine le Ceangaltáin Isteach  /   Ríomhphoist Frith-Iascaireachta  /  🕘 Taispeáin Crios Ama an tSeoltóra ...

👩🏼‍🤝‍👩🏻 Teagmhálaithe & Féilire: Baisc Cuir Teagmhálacha Ó Ríomhphoist Roghnaithe  /  Roinn Grúpa Teagmhála ar Ghrúpaí Aonair  /  Bain Meabhrúcháin Breithlá ...

Thar Gnéithe 100 Fan le do Thaiscéalaíocht! Cliceáil Anseo le Tuilleadh Amach.

 

 

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