Ide: Lòt lang yo se Google-tradui. Ou ka vizite a English vèsyon nan lyen sa a.
Ouvri yon sesyon
x
or
x
x
enskri
x

or

Ki jan yo fann dokiman nan dokiman miltip nan mo?

Si ou gen yon dokiman mo masiv ki ou bezwen divize an dokiman miltip, pran yon kèk minit li leson patikilye sa a. Tutorial sa a pral montre w de metòd pou divize yon dokiman nan dokiman miltip.

Pataje Pawòl dokiman pa delimite espesifik ak VBA

Pataje Pawòl dokiman pa paj avèk VBA

Pataje Pawòl dokiman pa tit / paj / seksyon kraze / paj kraze ak lè l sèvi avèk Kutools pou Pawòl

Fasil fann yon sèl dokiman Pawòl pou plizyè fwa pa paj, seksyon / paj kraze, oswa tit nan yon fwa!

Konpare pou divize yon dokiman Pawòl pa kopye ak kole, Kutools pou Pawòl pral fasilite ou travay, ak amelyore efikasite travay ou dramatikman pa karakteristik Split li a, ki ka byen vit fann aktyèl dokiman ouvèti Pawòl a plizyè moun pa paj, pa seksyon kraze, pa paj kraze, oswa nan tit 1 jan ou bezwen. Klike pou jijman gratis 60-jou!
Ajoute dokiman divize pa paj

Kutools pou Pawòl: Add 100 nouvo karakteristik avanse pou Pawòl 2003 / 2007 / 2010 / 2013 / 2016 / 2019.
Biwo Tab: Pèmèt Tabbed Korije ak Navigasyon nan Biwo, Jis tankou Chrome, Firefox, IE 8 / 9 / 10.
Klasik Menu pou Biwo: Pote vye Look nan Biwo 2003 Retounen nan Biwo 2007, 2010, 2013, 2016 ak 2019.

flèch ble jarèt dwat Pataje Pawòl dokiman pa delimite espesifik ak VBA

Olye pou yo divize dokiman nan dokiman miltip manyèlman, metòd sa a pral prezante yon VBA fann yon dokiman Pawòl pa delimite a espesifye nan Pawòl. Tanpri fè jan sa a:

1. Peze Alt + F11 kle ansanm yo louvri Microsoft vizyèl Debaz la pou fenèt aplikasyon;

2. Klike sou Antre > Modil, ak Lè sa a, keratin anba a VBA postal nan fenèt la nouvo Module ouvèti.

VBA: Dokiman Paj Split nan dokiman miltip pa Delimiter

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. Lè sa a, klike sou kouri bouton oswa peze F5 kle pou aplike VBA a.

4. Nan eklate soti Microsoft Word dokiman, tanpri klike sou bouton an Wi ale pi devan.

Remak:
(1) Asire ou ke ou ajoute délimiter menm jan ak "///" nan tès la sub nan dokiman ki genyen ant chak seksyon nan tèks ou vle separe. Epitou, ou ka chanje "///" nan nenpòt delimitè yo satisfè bezwen ou yo.
(2) Ou ka chanje dokiman yo "Nòt" nan tès la sub nan kostim bezwen ou yo.
(3) Ak dokiman yo divize yo pral sove nan plas la menm ak dosye orijinal la.
(4) Ou pa bezwen ajoute delimiter nan fen dosye orijinal la, si ou fè, pral gen yon dokiman vid apre divize.


flèch ble jarèt dwat Pataje Pawòl dokiman pa paj avèk VBA

Isit la se yon lòt VBA ede ou byen vit fann yon sèl dokiman Pawòl nan miltip pa paj nan Pawòl. Tanpri fè jan sa a:

1. Peze Alt + F11 kle ansanm yo louvri Microsoft vizyèl Debaz la pou fenèt aplikasyon;

2. Klike sou Antre > Modil, ak Lè sa a, keratin anba a VBA postal nan fenèt la nouvo Module ouvèti.

VBA: Dokiman Split nan Dokiman miltip pa Page nan Pawòl

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. Lè sa a, klike sou kouri bouton oswa laprès F5 kle pou aplike VBA a.

Remak: Dokiman yo divize yo pral sove nan menm bagay la tou ak dosye orijinal la.


flèch ble jarèt dwat Pataje Pawòl dokiman pa tit / paj / seksyon kraze / paj kraze ak lè l sèvi avèk Kutools pou Pawòl

Si ou gen Kutools pou Pawòl enstale, ou ka aplike li yo Split fonksyon fasil fann yon dokiman nan yo menm miltip pa paj, tit, seksyon kraze, oswa repo paj jan ou bezwen nan Pawòl ..

Kutools pou Pawòl se yon sou la men ajoute-an fasilite travay ou ak amelyore kapasite ou nan pwosesis dokiman mo. Gratis jijman pou jou 45! Jwenn li kounye a!

1. Klike sou Kutools Plis > Split yo ki ap pèmèt karakteristik nan Split.
doc fann dokiman 001

2. Nan dyalòg la ouvèti louvri nan ekran an, tanpri (1) presize folder nan destinasyon ou pral sove dokiman yo divize an, (2) tcheke kritè ou pral fann pa soti nan la Pataje pa gout desann lis, epi (3) klike sou la OK bouton. Al gade nan Ekran:

Epi, koulye a se dokiman Pawòl aktyèl la divize pa kritè yo espesifik (Tit 1 nan ka mwen an), ak folder nan destinasyon ouvè otomatikman ak dokiman fann. Al gade nan Ekran:
doc fann dokiman 002

Remak: Sa a karakteristik Split Split tou sipò fann yon sèl Pawòl dokiman nan paj, nan paj kraze, ak pa seksyon kraze fasil nan Pawòl. Gade anba a Ekran:

Sèvi yon dokiman Pawòl pou plizyè fwa pa paj:

Mete yon sèl dokiman Pawòl pou plizyè fwa pa paj kraze:

Mete yon sèl dokiman Pawòl pou plizyè fwa pa seksyon kraze:

Tabbed Navigasyon & koreksyon dokiman Pawòl plizyè kòm Firefox, Chrome, Entènèt Eksplore 10!

Ou ka abitye wè paj miltip nan Firefox / Chrome / IE, ak chanje ant yo pa klike sou onglè korespondan fasil. Isit la, Biwo Tab sipòte pwosesis menm jan an, ki pèmèt ou browse dokiman Pawòl plizyè nan yon sèl fenèt Pawòl, ak fasil chanje ant yo pa klike sou onglè yo. Klike sou karakteristik plen gratis jijman!
Browse plizyè mo dokiman nan yon fenèt tankou Firefox


flèch ble jarèt dwatAtik relatif:

Rantre dokiman miltip epi kenbe fòma nan mo




Kutools pou Pawòl

Plis pase 100 Fonksyon avanse pou Pawòl 2003, 2007, 2010, 2013, 2016 ak 2019

piki-kutools-700-225-kte

Plis Features | Telechaje gratis | Se sèlman $ 39.00 pou dè santèn de fonksyon

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Maya · 1 months ago
    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?
  • To post as a guest, your comment is unpublished.
    Lisa · 6 months ago
    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?
    • To post as a guest, your comment is unpublished.
      Savvyno · 1 months ago
      I am working on this as well but have not found a way to do it besides manually.
    • To post as a guest, your comment is unpublished.
      Steve · 4 months ago
      Does not work at all for me. Goes through the motions but no documents are saved. Maybe because I am using .DOCX files?
      • To post as a guest, your comment is unpublished.
        Savvy · 1 months ago
        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.
        • To post as a guest, your comment is unpublished.
          Steve · 1 months ago
          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.
      • To post as a guest, your comment is unpublished.
        Steve · 4 months ago
        Maybe something to do with Windows 7 settings? Thoughts from anyone?
  • To post as a guest, your comment is unpublished.
    Fenice · 7 months ago
    Mais comment garder une mise en page complexe (image de fond, marges, etc) ?
    Great but how to keep the lay-out (background image, margins ?)
  • To post as a guest, your comment is unpublished.
    Andrew · 8 months ago
    Can you split the document based on Heading 1 styles as your "delimiter".
    • To post as a guest, your comment is unpublished.
      kellytte · 2 months ago
      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.
  • To post as a guest, your comment is unpublished.
    SHUBAM AWASTHI · 11 months ago
    i need to split the document using page range. for example i wanted to split 1 to 10 page in another document. how i can do it