Μετάβαση στο κύριο περιεχόμενο

Πώς να χωρίσετε το έγγραφο σε πολλά έγγραφα με τη λέξη;

Εάν έχετε ένα τεράστιο έγγραφο λέξεων που πρέπει να χωρίσετε σε πολλά έγγραφα, αφιερώστε λίγα λεπτά για να διαβάσετε αυτό το σεμινάριο. Αυτό το σεμινάριο θα σας δείξει δύο μεθόδους για να χωρίσετε ένα έγγραφο σε πολλά έγγραφα.


Διαχωρισμός εγγράφου Word από καθορισμένο οριοθέτη με VBA

Αντί να χωρίζει το έγγραφο σε πολλά έγγραφα με μη αυτόματο τρόπο, αυτή η μέθοδος θα εισαγάγει ένα VBA για να διαχωρίσει ένα έγγραφο του Word από τον καθορισμένο οριοθέτη στο Word. Κάντε τα εξής:

1. Τύπος Alt + F11 πλήκτρα μαζί για να ανοίξετε το παράθυρο της Microsoft Visual Basic for Application.

2. Κλίκ Κύριο θέμα > Μονάδα μέτρησηςκαι, στη συνέχεια, επικολλήστε κάτω από τον κώδικα VBA στο νέο παράθυρο ανοίγματος Module.

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 στο νέο παράθυρο ανοίγματος Module.

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 για Word

Εάν έχετε εγκαταστήσει το Kutools for Word, μπορείτε να το εφαρμόσετε Σπλιτ Λειτουργία για εύκολη διάσπαση ενός εγγράφου σε πολλαπλά έγγραφα ανά σελίδα, επικεφαλίδα, αλλαγή ενότητας ή αλλαγή σελίδας όπως χρειάζεστε στο Word ..

Kutools για το Word είναι το απόλυτο πρόσθετο του Word που βελτιστοποιεί την εργασία σας και ενισχύει τις δεξιότητές σας στην επεξεργασία εγγράφων. Δοκιμάστε το ΔΩΡΕΑΝ 60 ημέρες! Παρ'το τώρα!

1.Κάντε κλικ Kutools Plus > Σπλιτ για να ενεργοποιήσετε το Σπλιτ χαρακτηριστικό.

2. Στο άνοιγμα διαλόγου Split στην οθόνη, μπορείτε να κάνετε τα εξής:

(1) Επιλέξτε τον τρόπο διαχωρισμού από το Διαχωρισμός από Αναπτυσσόμενη λίστα.
Αυτή η δυνατότητα υποστηρίζει 6 τρόπους διαχωρισμού: επικεφαλίδα 1, αλλαγές σελίδας, διαλείμματα ενότητας, σελίδες, κάθε n σελίδες και προσαρμοσμένες περιοχές σελίδων όπως φαίνεται στο παρακάτω στιγμιότυπο οθόνης:

(2) Κάντε κλικ στο Αναζήτηση κουμπί  να προσδιορίσω στον φάκελο προορισμού στον οποίο θα αποθηκεύσετε τα διαχωρισμένα έγγραφα ·

(3) Πληκτρολογήστε μια λέξη-κλειδί ως πρόθεμα νέων ονομάτων εγγράφων στο Πρόθεμα εγγράφου κουτί.

Συμβουλές:
(1) Εάν καθορίσετε τη διαίρεση του τρέχοντος εγγράφου από Κάθε n σελίδες, πρέπει να καθορίσετε τον αριθμό στο Κάθε n σελίδες κουτί;

(2) Εάν ορίσετε να διαχωρίσετε το τρέχον έγγραφο με προσαρμοσμένα εύρη σελίδων, πρέπει να εισαγάγετε αυτά τα προσαρμοσμένα εύρη σελίδων διαχωρισμένα με κόμματα στο Σελίδα πλαίσιο, για παράδειγμα, πληκτρολογήστε 1, 3-5, 12 στο πλαίσιο.

3. Κάντε κλικ στο Ok κουμπί για να αρχίσετε να χωρίζετε.

Στη συνέχεια, το τρέχον έγγραφο χωρίζεται με τον καθορισμένο τρόπο διαχωρισμού και τα νέα έγγραφα θα αποθηκευτούν μαζικά στο φάκελο προορισμού.

Περιήγηση με καρτέλες και επεξεργασία πολλών εγγράφων του Word όπως Firefox, Chrome, Internet Explore 10!

Ίσως εξοικειωθείτε με την προβολή πολλών ιστοσελίδων στο Firefox / Chrome / IE και εναλλαγή μεταξύ τους κάνοντας κλικ στις αντίστοιχες καρτέλες εύκολα. Εδώ, το Office Tab υποστηρίζει παρόμοια επεξεργασία, η οποία σας επιτρέπει να περιηγηθείτε σε πολλά έγγραφα του Word σε ένα παράθυρο του Word και να αλλάξετε εύκολα μεταξύ τους κάνοντας κλικ στις καρτέλες τους. Κάντε κλικ για πλήρη δοκιμή δωρεάν λειτουργιών!
Περιηγηθείτε σε έγγραφα πολλών λέξεων σε ένα παράθυρο ως Firefox


Σχετικά άρθρα:


Τα καλύτερα εργαλεία παραγωγικότητας γραφείου

Kutools για το Word - Βελτιώστε την εμπειρία σας στο Word με το Over 100 Αξιοσημείωτα χαρακτηριστικά!

🤖 Kutools AI Assistant: Μεταμορφώστε το γραπτό σας με AI - Δημιουργία Περιεχομένου  /  Ξαναγράψτε το κείμενο  /  Συνοψίστε τα έγγραφα  /  Ζητήστε πληροφορίες με βάση το Έγγραφο, όλα μέσα στο Word

📘 Κυριαρχία εγγράφων: Διαίρεση σελίδων  /  Συγχώνευση εγγράφων  /  Εξαγωγή επιλογής σε διάφορες μορφές (PDF/TXT/DOC/HTML...)  /  Μαζική μετατροπή σε PDF  /  Εξαγωγή σελίδων ως εικόνες  /  Εκτύπωση πολλών αρχείων ταυτόχρονα...

Επεξεργασία Περιεχομένων: Μαζική εύρεση και αντικατάσταση σε πολλά αρχεία  /  Αλλαγή μεγέθους όλων των εικόνων  /  Μεταφορά σειρών και στηλών πίνακα  /  Μετατροπή πίνακα σε κείμενο...

🧹 Καθαρισμός χωρίς κόπο: Σαρώστε μακριά Επιπλέον χώροι  /  Διακοπές ενότητας  /  Όλες οι κεφαλίδες  /  Κουτιά κειμένου  /  Υπερ-συνδέσεις  / Για περισσότερα εργαλεία αφαίρεσης, κατευθυνθείτε στο δικό μας Κατάργηση ομάδας...

Δημιουργικά ένθετα: Εισάγετε Χιλιάδες Διαχωριστές  /  Πλαίσια ελέγχου  /  Κουμπιά ραδιοφώνου  /  QR Code  /  barcode  /  Διαγώνιος γραμμικός πίνακας  /  Λεζάντα εξίσωσης  /  Λεζάντα εικόνας  /  Λεζάντα πίνακα  /  Πολλαπλές εικόνες  / Ανακαλύψτε περισσότερα στο Εισαγωγή ομάδας...

🔍 Επιλογές Ακρίβειας: Επισήμανση συγκεκριμένες σελίδες  /  πίνακες  /  σχήματα  /  επικεφαλίδες παραγράφους  / Βελτιώστε την πλοήγηση με περισσότερο Επιλέξτε χαρακτηριστικά...

Βελτιώσεις αστεριών: Πλοηγηθείτε γρήγορα σε οποιαδήποτε τοποθεσία  /  αυτόματη εισαγωγή επαναλαμβανόμενου κειμένου  /  εναλλαγή μεταξύ των παραθύρων εγγράφων  /  11 Εργαλεία μετατροπής...

???? Θέλετε να δοκιμάσετε αυτές τις δυνατότητες; Το Kutools για το 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