Բաց թողնել հիմնական բովանդակությունը

Ինչպե՞ս փաստաթուղթը բառով բաժանել բազմաթիվ փաստաթղթերի:

Եթե ​​ունեք զանգված բառերի փաստաթուղթ, որը դուք պետք է բաժանեք բազմաթիվ փաստաթղթերի, մի քանի րոպե տրամադրեք այս ձեռնարկը կարդալուն: Այս ձեռնարկը ձեզ ցույց կտա փաստաթուղթը բազմաթիվ փաստաթղթերի բաժանելու երկու եղանակ:


Split Word փաստաթուղթը VBA- ի հետ սահմանված սահմանաչափի միջոցով

Փոխանակ փաստաթուղթը ձեռքով բաժանելու բազմաթիվ փաստաթղթերի, այս մեթոդը կներկայացնի VBA ՝ Word- ի փաստաթուղթը բաժանելու համար Word- ում նշված սահմանազատիչը: Խնդրում ենք անել հետևյալը.

1. Մամուլ Alt + F11 միասին ստեղներ ՝ Microsoft Visual Basic հավելվածի համար պատուհանը բացելու համար;

2: Սեղմեք Տեղադրել > Մոդուլներև ապա տեղադրեք VBA կոդի տակ ՝ նոր բացվող Մոդուլի պատուհանում:

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) Ձեզ հարկավոր չէ բնօրինակ ֆայլի վերջում սահմանազատիչ ավելացնել, եթե դա անեք, պառակտումից հետո դատարկ փաստաթուղթ կլինի:

Split Word փաստաթուղթը էջ առ VBA- ի հետ

Ահա ևս մեկ VBA, որը կօգնի ձեզ արագ Word- ի մեկ փաստաթուղթ բազմապատկել Word- ով էջում: Խնդրում ենք անել հետևյալը.

1. Մամուլ Alt + F11 միասին ստեղներ ՝ Microsoft Visual Basic հավելվածի համար պատուհանը բացելու համար;

2: Սեղմեք Տեղադրել > Մոդուլներև ապա տեղադրեք VBA կոդի տակ ՝ նոր բացվող Մոդուլի պատուհանում:

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 կիրառելու բանալին:

Նշում: Բաժանող փաստաթղթերը կպահվեն նույն տեղում ՝ բնօրինակ ֆայլով:


Split Word փաստաթուղթը վերնագրով / էջ / հատվածի ընդմիջում / էջի ընդհատում `օգտագործելով Kutools for Word

Եթե ​​Word- ի համար տեղադրել եք Kutools, կարող եք կիրառել այն պառակտում գործառույթը `մեկ փաստաթուղթը հեշտությամբ բաժանելու բազմաթիվ փաստաթղթերի` ըստ էջի, վերնագրի, հատվածի ընդմիջման կամ էջի ընդմիջման, որքան անհրաժեշտ է Word- ում:

Kutools բառի համար Word-ի վերջնական հավելումն է, որը հեշտացնում է ձեր աշխատանքը և խթանում փաստաթղթերի մշակման հմտությունները: Փորձեք այն ԱՆՎՃԱՐ 60 օրեր! Ստացիր այն հիմա!

1.Սեղմել Kutools Plus > պառակտում հնարավորություն ընձեռել պառակտում առանձնահատկություն.

2, Էկրանի բացման պառակտման երկխոսությունում կարող եք անել հետևյալը.

(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 բառի համար - Բարձրացրեք ձեր բառի փորձը Over-ի հետ 100 Ուշագրավ առանձնահատկություններ!

🤖 Kutools AI օգնականՓոխակերպեք ձեր գրածը AI-ի միջոցով - Ստեղծեք բովանդակություն  /  Վերաշարադրել տեքստը  /  Ամփոփել փաստաթղթերը  /  Հարցրեք տեղեկատվության համար Փաստաթղթի հիման վրա, բոլորը Word-ի շրջանակներում

📘 Փաստաթղթերի տիրապետում: Էջերի բաժանում  /  Միաձուլեք փաստաթղթերը  /  Արտահանել ընտրություն տարբեր ձևաչափերով (PDF/TXT/DOC/HTML...)  /  Խմբաքանակի փոխակերպում PDF-ի  /  Արտահանել էջերը որպես պատկերներ  /  Միանգամից մի քանի ֆայլ տպեք...

Բովանդակության խմբագրում: Խմբաքանակի որոնում և փոխարինում Բազմաթիվ Ֆայլերի միջով  /  Չափափոխել բոլոր նկարները  /  Փոխադրել աղյուսակի տողերը և սյունակները  /  Աղյուսակը տեքստի վերափոխել...

🧹 Անհեշտ մաքրություն:Հեռացրու Լրացուցիչ տարածքներ  /  Բաժնի ընդմիջումներ  /  Բոլոր վերնագրերը  /  Տեքստային տուփեր  /  Hyperlinks  / Լրացուցիչ հեռացման գործիքների համար այցելեք մեր Հեռացնել խումբը...

Ստեղծագործական ներդիրներՆերդիր Հազար բաժանիչներ  /  Նշեք վանդակները  /  Ռադիո կոճակներ  /  QR Code  /  Շտրիխ կոդ  /  Անկյունագծային աղյուսակ  /  Հավասարության վերնագիր  /  Նկարի վերնագիր  /  Աղյուսակի վերնագիր  /  Բազմաթիվ նկարներ  / Բացահայտեք ավելին Տեղադրեք խումբը...

🔍 Ճշգրիտ ընտրանքներ: Մատնանշել կոնկրետ էջեր  /  սեղաններ  /  ձեւավորում  /  վերնագրի պարբերություններ  / Ընդլայնել նավարկությունը ավելին Ընտրեք հատկանիշներ...

Աստղերի բարելավումներ: Արագ նավարկեք ցանկացած վայր  /  կրկնվող տեքստի ավտոմատ տեղադրում  /  անխափան անցում փաստաթղթի պատուհանների միջև  /  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