Note: The other languages of the website are Google-translated. Back to English
Mewngofnodi  \/ 
x
or
x
Cofrestru  \/ 
x

or

Sut i arbed pob tudalen fel ffeiliau pdf ar wahân mewn dogfen Word?

Wrth ddefnyddio dogfen Microsoft Word, gallwch arbed pob tudalen fel ffeiliau pdf ar wahân fesul un gyda'i swyddogaeth Save As. Fodd bynnag, os oes cannoedd o dudalennau angen eu rhannu a'u cadw fel ffeiliau pdf unigol, sut allwch chi wneud? Mae'r erthygl hon yn darparu dull i chi ddatrys y broblem hon yn gyflym.

Cadwch bob tudalen fel ffeiliau pdf ar wahân mewn swmp gyda chod VBA


Cadwch bob tudalen fel ffeiliau pdf ar wahân mewn swmp gyda chod VBA

Mae'r cod VBA isod yn eich helpu i arbed pob tudalen mewn dogfen yn gyflym fel ffeiliau pdf unigol ar yr un pryd. Gwnewch fel a ganlyn.

1. Agorwch y ddogfen byddwch yn cadw pob tudalen neu dudalennau penodol fel ffeiliau pdf, yna pwyswch y Alt + F11 allweddi i agor y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.

2. Yn y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr, cliciwch Mewnosod > Modiwl, copïwch isod god VBA i mewn i ffenestr y Modiwl.

Cod VBA: Cadwch bob tudalen fel ffeiliau pdf ar wahân ar yr un pryd mewn dogfen Word

Sub SaveAsSeparatePDFs()
'Updated by Extendoffice 20180906
    Dim I As Long
    Dim xStr As String
    Dim xPathStr As Variant
    Dim xDictoryStr As String
    Dim xFileDlg As FileDialog
    Dim xStartPage, xEndPage As Long
    Dim xStartPageStr, xEndPageStr As String
    Set xFileDlg = Application.FileDialog(msoFileDialogFolderPicker)
    If xFileDlg.Show <> -1 Then
        MsgBox "Please chose a valid directory", vbInformation, "Kutools for Word"
        Exit Sub
    End If
    xPathStr = xFileDlg.SelectedItems(1)
    xStartPageStr = InputBox("Begin saving PDFs starting with page __? " & vbNewLine & "(ex: 1)", "Kutools for Word")
    xEndPageStr = InputBox("Save PDFs until page __?" & vbNewLine & "(ex: 7)", "Kutools for Word")
    If Not (IsNumeric(xStartPageStr) And IsNumeric(xEndPageStr)) Then
        MsgBox "The enterng start page and end page should be number format", vbInformation, "Kutools for Word"
        Exit Sub
    End If
    xStartPage = CInt(xStartPageStr)
    xEndPage = CInt(xEndPageStr)
    If xStartPage > xEndPage Then
        MsgBox "The start page number can't be larger than end page", vbInformation, "Kutools for Word"
        Exit Sub
    End If
    If xEndPage > ActiveDocument.BuiltInDocumentProperties(wdPropertyPages) Then
        xEndPage = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)
    End If
    For I = xStartPage To xEndPage
        ActiveDocument.ExportAsFixedFormat xPathStr & "\Page_" & I & ".pdf", _
        wdExportFormatPDF, False, wdExportOptimizeForPrint, wdExportFromTo, I, I, wdExportDocumentWithMarkup, _
        False, False, wdExportCreateHeadingBookmarks, True, False, False
    Next
End Sub

3. Gwasgwch y F5 allwedd i redeg y cod.

4. Yn y Pori ffenestr, dewiswch ffolder i gadw'r ffeiliau pdf a chliciwch ar y OK botwm. Gweler y screenshot:

5. Yn y cyntaf Kutools am Word blwch deialog, nodwch rif tudalen cychwyn eich dogfen yn y blwch testun a chlicio OK.

6. Yn yr ail Kutools am Word blwch deialog, nodwch rif tudalen olaf eich dogfen, yna cliciwch OK. Gweler y screenshot:

Nodyn: Os ydych chi am arbed sawl tudalen yn barhaus mewn dogfen fel ffeiliau pdf ar wahân fel tudalennau 4, 5 a 6, nodwch 4 a 6 ar wahân yn y ddau flwch deialog uchod.

Ar ôl rhedeg y cod, ewch i'r ffolder penodedig a ddewisoch yng ngham 4, gallwch weld bod pob tudalen yn cael ei rhannu a'i chadw fel ffeiliau pdf unigol fel y dangosir isod.


Rhannwch ac arbedwch bob tudalen o ddogfen fel dogfennau newydd ar wahân:

Mae'r Dogfen Hollt cyfleustodau Kutools ar gyfer Excel yn gallu'ch helpu chi i rannu ac arbed pob tudalen o'r ddogfen gyfredol yn hawdd mewn dogfen newydd ar wahân mewn swmp fel y dangosir y llun isod. Dadlwythwch a rhoi cynnig arni nawr! (Llwybr am ddim 60 diwrnod)


Offer Cynhyrchedd Geiriau a Argymhellir

 

Kutools For Word - Mwy na 100 o Nodweddion Uwch ar gyfer Word, Arbedwch Eich Amser 50%

  • Gellir gwneud gweithrediadau cymhleth ac ailadroddus brosesu un-amser mewn eiliadau.
  • Mewnosodwch ddelweddau lluosog ar draws ffolderau yn nogfen Word ar unwaith.
  • Uno a chyfuno ffeiliau Word lluosog ar draws ffolderau yn un gyda'r drefn a ddymunir gennych.
  • Rhannwch y ddogfen gyfredol yn ddogfennau ar wahân yn ôl pennawd, toriad adran neu feini prawf eraill.
  • Trosi ffeiliau rhwng Doc a Docx, Docx a PDF, casglu offer ar gyfer trawsnewid a dewis cyffredin, ac ati ...
Say something here...
symbols left.
You are guest
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.
    blabla · 1 months ago

    What can I do to save each page with a reference in the document and not by page name?
  • To post as a guest, your comment is unpublished.
    Colette · 5 months ago
    Beautiful! Thank you, your instructions are easy to follow and spot. You have saved us a lot of time.

  • To post as a guest, your comment is unpublished.
    Meyer · 1 years ago
    What can I do to save each page with a reference in the document and not by page name?
  • To post as a guest, your comment is unpublished.
    franco.gagliano@gmail.com · 2 years ago
    Salve, ho utilizzato i vostri preziosi suggerimenti e sono riuscito facilmente a generare i file singoli in pdf partendo da un file word di stampa unione. Vorrei chiedere se è possibile nominare i singoli file pdf, al posto del numero di pagina, con un nome specifico di un campo contenuto nel file di excel che ho utilizzato per stampa unione. Sarebbe il massimo. Grazie mille
  • To post as a guest, your comment is unpublished.
    Bharadwaj · 2 years ago
    down loaded the kutools for trial - installed and when trying to something the word is closing and the tool never worked.

    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      Good day,
      Thanks to let me know the bug, and sorry for the inconvenience. Would you provide your Word version? We need to figure out the problem with more information.