انتقل إلى المحتوى الرئيسي

كيفية تحويل ملفات بتنسيق doc. إلى ملفات docx. في Word؟

لنفترض أنك تلقيت بعض مستندات Word بتنسيق 97-2003 ، كيف يمكنك تحويل جميع مستندات تنسيق doc هذه إلى تنسيق docx. مرة واحدة؟ ستوضح لك هذه المقالة طريقتين لحل هذه المشكلة.

تحويل ملفات بتنسيق doc. إلى .docx باستخدام كود VBA
تحويل ملفات بتنسيق .doc إلى .docx باستخدام Kutools for Word


تحويل ملفات بتنسيق doc. إلى .docx باستخدام كود VBA

سيُظهر لك هذا القسم رمز VBA لتحويل جميع المستندات بتنسيق doc. في مجلد محدد إلى مستندات docx. مرة واحدة. الرجاء القيام بما يلي.

1. الرجاء جمع كافة المستندات بتنسيق doc. التي ستقوم بتحويلها إلى .docx في مجلد محدد.

2. اضغط على قديم + F11 مفتاح لفتح ميكروسوفت فيسوال باسيك للتطبيقات نافذة.

3. في النافذة ، انقر فوق إدراج > وحدة. ثم انسخ رمز VBA أدناه في نافذة الوحدة النمطية.

كود فبا: تحويل دفعة جميع وثائق تنسيق doc. إلى docx. في مجلد معين

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. اضغط على F5 مفتاح لتشغيل الكود. في الافتتاح تصفح ، حدد المجلد الذي يحتوي على مستندات تنسيق doc. وانقر فوق OK. انظر لقطة الشاشة:

ثم يتم تحويل جميع المستندات بتنسيق .doc إلى مستندات .docx على الفور كما هو موضح أدناه لقطة الشاشة.


تحويل ملفات بتنسيق .doc إلى .docx باستخدام Kutools for Word

سيوصى باستخدام أداة مفيدة في هذا القسم. مع ال Doc / Docx فائدة كوتولس للكلمة، يمكنك بسهولة تحويل جميع المستندات بتنسيق doc. في مجلد إلى مستندات docx. يرجى المحاولة على النحو التالي.

كوتولس للكلمة : مع أكثر من 100 وظيفة إضافية مفيدة لـ Word ، حر في المحاولة دون قيود 60 أيام.

1. الرجاء جمع كافة المستندات بتنسيق doc. في مجلد محدد ، ثم انقر فوق كوتولس بلس > Doc / Docx. انظر لقطة الشاشة:

2. في ال محول تنسيق المستند مربع الحوار ، ما عليك القيام به على النحو التالي:

2.1) حدد المجلد الذي يحتوي على مستندات بتنسيق .doc في ملف مجلد الملف المصدر قسم.
شنومكس) حدد تحويل doc إلى docx من تنسيق تحويل قائمة منسدلة؛
2.3) بشكل افتراضي ، فإن ملف مسار الوجهة هو نفس المصدر المربع محددًا. إذا كنت تريد وضع جميع مستندات .docx المحولة في نفس المجلد ، فقط احتفظ بهذا الخيار محددًا ؛
إذا كنت تريد فصل مستندات .docx ومستندات doc المصدر ، فيرجى إلغاء تحديد مسار الوجهة هو نفس المصدر ، وحدد مجلدًا جديدًا لحفظ مستندات .docx في ملف حفظ في صندوق؛
شنومكس) انقر فوق آبدأ زر. انظر لقطة الشاشة:

3. ثم ينبثق مربع حوار لإخبارك بعدد المستندات التي تم تحويلها بنجاح ، انقر فوق OK زر وأغلق ملف محول تنسيق المستند نافذة.

يتم الآن تحويل جميع المستندات بتنسيق doc. إلى ملفات docx. انظر لقطة الشاشة:

إذا كنت تريد الحصول على نسخة تجريبية مجانية من هذه الأداة المساعدة ، فيرجى الانتقال إلى تنزيل البرنامج مجانًا اولا ثم انتقل لتطبيق العملية حسب الخطوات اعلاه.


أفضل أدوات إنتاجية المكتب

كوتولس لتوقعات - أكثر من 100 ميزة قوية لتعزيز توقعاتك

🤖 مساعد بريد الذكاء الاصطناعي: رسائل بريد إلكتروني احترافية فورية مع سحر الذكاء الاصطناعي - بنقرة واحدة للردود العبقرية، والنغمة المثالية، وإتقان متعدد اللغات. تحويل البريد الإلكتروني دون عناء! ...

📧 أتمتة البريد الإلكتروني: خارج المكتب (متوفر لـ POP وIMAP)  /  جدولة إرسال رسائل البريد الإلكتروني  /  نسخة تلقائية/نسخة مخفية الوجهة حسب القواعد عند إرسال البريد الإلكتروني  /  إعادة التوجيه التلقائي (القواعد المتقدمة)   /  إضافة تحية تلقائية   /  تقسيم رسائل البريد الإلكتروني متعددة المستلمين تلقائيًا إلى رسائل فردية 

📨 إدارة البريد الإلكتروني: استدعاء رسائل البريد الإلكتروني بسهولة  /  حظر رسائل البريد الإلكتروني الاحتيالية حسب الموضوعات والآخرين  /  حذف رسائل البريد الإلكتروني المكررة  /  المزيد من خيارات البحث  /  توحيد المجلدات 

📁 المرفقات بروحفظ دفعة  /  فصل دفعة  /  ضغط دفعة  /  حفظ تلقائي   /  فصل تلقائي  /  ضغط تلقائي 

؟؟؟؟ واجهة ماجيك: 😊 المزيد من الرموز التعبيرية الجميلة والرائعة   /  عزز إنتاجية Outlook الخاص بك باستخدام طرق العرض المبوبة  /  تصغير Outlook بدلاً من الإغلاق 

؟؟؟؟ بنقرة واحدة عجائب: الرد على الكل بالمرفقات الواردة  /   رسائل البريد الإلكتروني لمكافحة التصيد  /  🕘إظهار المنطقة الزمنية للمرسل 

👩🏼‍🤝‍👩🏻 جهات الاتصال والتقويم: دفعة إضافة جهات الاتصال من رسائل البريد الإلكتروني المحددة  /  تقسيم مجموعة اتصال إلى مجموعات فردية  /  إزالة تذكير عيد ميلاد 

على مدى ميزات 100 في انتظار الاستكشاف الخاص بك! انقر هنا لاكتشاف المزيد.

 

 

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