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

كيفية تقسيم المستند إلى مستندات متعددة في Word؟

إذا كان لديك مستند Word ضخم تحتاج إلى تقسيمه إلى مستندات متعددة ، فاستغرق بضع دقائق لقراءة هذا البرنامج التعليمي. سيوضح لك هذا البرنامج التعليمي طريقتين لتقسيم مستند إلى مستندات متعددة.


انقسام مستند Word بواسطة محدد محدد باستخدام VBA

بدلاً من تقسيم المستند إلى مستندات متعددة يدويًا ، ستقدم هذه الطريقة VBA لتقسيم مستند Word بواسطة المحدد المحدد في Word. الرجاء القيام بما يلي:

1. صحافة ALT + F11 مفاتيح معًا لفتح نافذة Microsoft Visual Basic for Application ؛

2. انقر إدراج > وحدة، ثم الصق رمز فبا أدناه في نافذة الوحدة النمطية الافتتاحية الجديدة.

VBA: تقسيم مستند Word إلى مستندات متعددة بواسطة محدد

Sub SplitNotes(delim As String, strFilename As String)
Dim doc As Document
Dim arrNotes
Dim I As Long
Dim X As Long
Dim Response As Integer
arrNotes = Split(ActiveDocument.Range, delim)
Response = MsgBox("This will split the document into " & UBound(arrNotes) + 1 & " sections.Do you wish to proceed?", 4)
If Response = 7 Then Exit Sub
For I = LBound(arrNotes) To UBound(arrNotes)
If Trim(arrNotes(I)) <> "" Then
X = X + 1
Set doc = Documents.Add
doc.Range = arrNotes(I)
doc.SaveAs ThisDocument.Path & "\" & strFilename & Format(X, "000")
doc.Close True
End If
Next I
End Sub
Sub test()
'delimiter & filename
SplitNotes "///", "Notes "
End Sub

3. ثم اضغط يجري زر أو اضغط على مفتاح F5 لتطبيق VBA.

4. في مستند Microsoft Word المنبثق ، يرجى النقر فوق الزر "نعم" للمضي قدمًا.

ملحوظة:
(1) تأكد من إضافة المحدِّد كما هو "///" في الاختبار الفرعي للمستند بين كل قسم من النص ترغب في فصله. أيضا ، يمكنك التغيير "///" إلى أي محددات لتلبية احتياجاتك.
(2) يمكنك تغيير المستندات "ملاحظات" في الاختبار الفرعي ليناسب احتياجاتك.
(3) ويتم حفظ المستندات المجزأة في نفس المكان مع الملف الأصلي.
(4) لا تحتاج إلى إضافة محدد إلى نهاية الملف الأصلي ، إذا قمت بذلك ، فسيكون هناك مستند فارغ بعد التقسيم.

تقسيم مستند Word بصفحة باستخدام VBA

فيما يلي VBA آخر لمساعدتك في تقسيم مستند Word سريعًا إلى عدة صفحات في Word. الرجاء القيام بما يلي:

1. صحافة ALT + F11 مفاتيح معًا لفتح نافذة Microsoft Visual Basic for Application ؛

2. انقر إدراج > وحدة، ثم الصق رمز فبا أدناه في نافذة الوحدة النمطية الافتتاحية الجديدة.

VBA: تقسيم المستند إلى مستندات متعددة حسب الصفحة في Word

Sub SplitIntoPages()
Dim docMultiple As Document
Dim docSingle As Document
Dim rngPage As Range
Dim iCurrentPage As Integer
Dim iPageCount As Integer
Dim strNewFileName As String
Application.ScreenUpdating = False 'Makes the code run faster and reduces screen _
flicker a bit.
Set docMultiple = ActiveDocument 'Work on the active document _
(the one currently containing the Selection)
Set rngPage = docMultiple.Range 'instantiate the range object
iCurrentPage = 1
'get the document's page count
iPageCount = docMultiple.Content.ComputeStatistics(wdStatisticPages)
Do Until iCurrentPage > iPageCount
If iCurrentPage = iPageCount Then
rngPage.End = ActiveDocument.Range.End 'last page (there won't be a next page)
Else
'Find the beginning of the next page
'Must use the Selection object. The Range.Goto method will not work on a page
Selection.GoTo wdGoToPage, wdGoToAbsolute, iCurrentPage + 1
'Set the end of the range to the point between the pages
rngPage.End = Selection.Start
End If
rngPage.Copy 'copy the page into the Windows clipboard
Set docSingle = Documents.Add 'create a new document
docSingle.Range.Paste 'paste the clipboard contents to the new document
'remove any manual page break to prevent a second blank
docSingle.Range.Find.Execute Findtext:="^m", ReplaceWith:=""
'build a new sequentially-numbered file name based on the original multi-paged file name and path
strNewFileName = Replace(docMultiple.FullName, ".doc", "_" & Right$("000" & iCurrentPage, 4) & ".doc")
docSingle.SaveAs strNewFileName 'save the new single-paged document
iCurrentPage = iCurrentPage + 1 'move to the next page
docSingle.Close 'close the new document
rngPage.Collapse wdCollapseEnd 'go to the next page
Loop 'go to the top of the do loop
Application.ScreenUpdating = True 'restore the screen updating
'Destroy the objects.
Set docMultiple = Nothing
Set docSingle = Nothing
Set rngPage = Nothing
End Sub 

3. ثم اضغط يجري زر أو اضغط F5 مفتاح لتطبيق VBA.

ملحوظة: سيتم حفظ مستندات التقسيم في نفس المكان مع الملف الأصلي.


انقسام مستند Word عن طريق العنوان / الصفحة / فاصل القسم / فاصل الصفحة باستخدام Kutools for Word

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

كوتولس للكلمة هي وظيفة Word الإضافية النهائية التي تعمل على تبسيط عملك وتعزيز مهارات معالجة المستندات لديك. جربه مجانًا 60 أيام! احصل عليها الآن!

1.انقر كوتولس بلس > الانقسام لتمكين الانقسام ميزة.

2. في مربع حوار الفتح Split في الشاشة ، يمكنك القيام بما يلي:

(1) اختر طريقة التقسيم من ملف تقسيم حسب قائمة منسدلة.
تدعم هذه الميزة 6 طرق للتقسيم: العنوان 1 ، فواصل الصفحات ، فواصل الأقسام ، الصفحات ، كل صفحات n ، ونطاقات الصفحات المخصصة كما هو موضح أدناه لقطة الشاشة:

(2) انقر فوق تصفح زر  لتحديد المجلد الوجهة الذي ستحفظ فيه المستندات المقسمة ؛

(3) اكتب كلمة أساسية كبادئة لأسماء المستندات الجديدة في ملف بادئة المستند مربع.

نصيحة:
(1) إذا قمت بتحديد تقسيم المستند الحالي إلى كل ن الصفحات، تحتاج إلى تحديد الرقم في كل ن الصفحات صندوق؛

(2) إذا حددت تقسيم المستند الحالي حسب نطاقات الصفحات المخصصة ، فستحتاج إلى إدخال نطاقات الصفحات المخصصة مفصولة بفواصل في صفحة مربع ، على سبيل المثال ، اكتب 1 ، 3-5 ، 12 في المربع.

3. انقر على Ok زر لبدء الانقسام.

ثم يتم تقسيم المستند الحالي بطريقة التقسيم المحددة ، وسيتم حفظ المستندات الجديدة في المجلد الوجهة بكميات كبيرة.

التصفح المبوب وتحرير مستندات Word متعددة مثل Firefox و Chrome و Internet Explore 10!

قد تكون مألوفًا لعرض صفحات ويب متعددة في Firefox / Chrome / IE ، والتبديل بينها عن طريق النقر فوق علامات التبويب المقابلة بسهولة. هنا ، يدعم Office Tab المعالجة المماثلة ، والتي تتيح لك تصفح مستندات Word متعددة في نافذة Word واحدة ، والتبديل بينها بسهولة عن طريق النقر فوق علامات التبويب الخاصة بها. انقر للحصول على الميزات الكاملة للتجربة المجانية!
تصفح مستندات متعددة الكلمات في نافذة واحدة مثل Firefox


المقالات النسبية:


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

كوتولس للكلمة - ارفع تجربة كلمتك مع أكثر 100 ميزات رائعة!

🤖 مساعد كوتولس AI: تحويل كتابتك باستخدام الذكاء الاصطناعي - توليد المحتوى  /  إعادة كتابة النص  /  تلخيص المستندات  /  الاستفسار عن المعلومات على أساس الوثيقة، كل ذلك داخل Word

📘 إتقان الوثيقة: تقسيم الصفحات  /  دمج المستندات  /  تصدير التحديد بتنسيقات مختلفة (PDF/TXT/DOC/HTML...)  /  دفعة تحويل إلى PDF  /  تصدير الصفحات كصور  /  طباعة ملفات متعددة في وقت واحد

تحرير المحتويات: بحث واستبدال دفعة عبر ملفات متعددة  /  تغيير حجم كافة الصور  /  تبديل صفوف وأعمدة الجدول  /  تحويل الجدول إلى نص

🧹 تنظيف سهل: اكتساح بعيدا مساحات اضافية  /  فواصل القسم  /  كل الرؤوس  /  مربعات النص  /  الارتباطات التشعبية  / لمزيد من أدوات الإزالة، توجه إلى موقعنا إزالة المجموعة

إدراجات إبداعية: إدراج الف فاصل  /  مربعات الاختيار  /  أزرار الراديو  /  رمز الاستجابة السريعة  /  الباركود  /  جدول الخط القطري  /  شرح المعادلة  /  صورة توضيحية  /  الجدول التوضيحي  /  صور متعددة  / اكتشف المزيد في أدخل المجموعة

🔍 التحديدات الدقيقة: يحدد بدقة صفحات محددة  /  الجداول  /  الأشكال  /  فقرات العناوين  / تحسين التنقل باستخدام الأكثر من ذلك حدد الميزات

تحسينات النجوم: انتقل بسرعة إلى أي مكان  /  الإدراج التلقائي للنص المتكرر  /  التبديل بسلاسة بين نوافذ المستندات  /  11 أدوات التحويل

؟؟؟؟ هل تريد تجربة هذه الميزات؟ يقدم Kutools for Word أ الإصدار التجريبي المجاني من 60 يومًا، بلا حدود! 🚀
 
Comments (45)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
VBA: Split Document into Multiple Documents by Page in Word - in this when we run it, outcome comes in portrait layout only. If original doc is in landscape then full data of the original doc does not come in the pages breaked by this vba.. There must be seperate vba for portrait and landscape docs.
This comment was minimized by the moderator on the site
I use the "split"-function of "Kutools For Word 9.00" with "header 1" and it works for 48 documents and then it simply stops without any message, as if it wohl have been finished. But I have 700 "header 1" in a 2000 pages document!
Is it simply too much for the tool or is there any other reason?
This comment was minimized by the moderator on the site
your code add new blank page in every page
This comment was minimized by the moderator on the site
This worked fine up until yesterday with Office365, but now I constantly get a runtime error '4605' stating this command is not available. Sometimes at the first page, sometimes at the 3rd page...I can't make it past 3 pages anymore. It happens with line 28 above...

docSingle.Range.Paste 'paste the clipboard contents to the new document
This comment was minimized by the moderator on the site
I've got this error too - Did you get anywhere with it?


Thanks
This comment was minimized by the moderator on the site
yes...i have to run it on the local hard drive. if i run it on a network file or with RemotePC it. has something to do with the script having to wait too long in between commands and it errors out copy and pasting to the clipboard. hope that helps!!
This comment was minimized by the moderator on the site
I copied the document distribution macro 'Split Word Document By Specified Delimiter With VBA', but in the line of 'sub test', the software reads it as a new macro and there are two macros here.
This comment was minimized by the moderator on the site
The script saves a two pages document, the second is total blank.

How to solve this?
This comment was minimized by the moderator on the site
Hi Jorge,
The VBA script introduced splits document by the separator “///”, and you do not need to add delimiter to the end of the original file, if you do, there will be a blank document after splitting.
This comment was minimized by the moderator on the site
Hi kellytte, Could you please explain a little further? I copy and paste the VBA script under the "Split Word by Document with VBA" from above and after I run the process following the instructions above, I always have to manually delete a 2nd blank page on each of the new documents that were created. Are you saying there is something that needs to be removed from the VBA script that will cause this to stop?
This comment was minimized by the moderator on the site
The split works great for me but on page in the merge file turns into 1.5 pages - something with the page layout (+ additional empty page at the end). any ideas how to go around that?
This comment was minimized by the moderator on the site
The Split Word By Document with VBA worked for me, but it is adding a blank page at the end of each document. Is there a way around this?
This comment was minimized by the moderator on the site
I am working on this as well but have not found a way to do it besides manually.
This comment was minimized by the moderator on the site
Does not work at all for me. Goes through the motions but no documents are saved. Maybe because I am using .DOCX files?
This comment was minimized by the moderator on the site
After playing with this code for over an hour I discovered you have to save the document you mail merged then you can run the code on the saved document that has all the pages you need to split up. Hope this helps.
This comment was minimized by the moderator on the site
I always start with a newly-saved document. I found the split documents were actually saved somewhere (I forget; doesn't matter) they were text only - all the formatting had been dropped.
This comment was minimized by the moderator on the site
Maybe something to do with Windows 7 settings? Thoughts from anyone?
This comment was minimized by the moderator on the site
Mais comment garder une mise en page complexe (image de fond, marges, etc) ?
Great but how to keep the lay-out (background image, margins ?)
This comment was minimized by the moderator on the site
Can you split the document based on Heading 1 styles as your "delimiter".
This comment was minimized by the moderator on the site
Hi Andrew,
The VBA script can split the entire document by page. If you need to split by heading 1, we suggest to try Kutools for Word’s Split (Document) feature.
This comment was minimized by the moderator on the site
Downloaded fodler doesnt open at all. Waiting for a long time.
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