Note: The other languages of the website are Google-translated. Back to English

How to split a Word document and save as separate PDF file?

In Word, you can save the whole document to a PDF file, but have you ever tried to split the document and then save the pages as separate PDF file? In this article, I will introduce the methods on solving this job quickly.

Split a Word document and save as separate PDF file with VBA

Split a Word document to separate files by pages/heading1/ break


Split a Word document and save as separate PDF file with VBA

Here the VBA code can help you directly split a Word document by pages then save as separate PDF files.

1. Press Alt + F11 keys to enable Microsoft Visual Basic for Applications window.

2. Click Insert > Module, copy and paste below code to the Module window.

VBA: Save Word as separate PDF

Sub SaveAsSeparatePDFs()
'UpdatebyExtendoffice20181120
    Dim I As Long
    Dim xDlg As FileDialog
    Dim xFolder As Variant
    Dim xStart, xEnd As Integer
    On Error GoTo lbl
    Set xDlg = Application.FileDialog(msoFileDialogFolderPicker)
    If xDlg.Show <> -1 Then Exit Sub
    xFolder = xDlg.SelectedItems(1)
    xStart = CInt(InputBox("Start Page", "KuTools for Word"))
    xEnd = CInt(InputBox("End Page:", "KuTools for Word"))
    If xStart <= xEnd Then
        For I = xStart To xEnd
            ActiveDocument.ExportAsFixedFormat OutputFileName:= _
                xFolder & "\Page_" & I & ".pdf", ExportFormat:=wdExportFormatPDF, _
                OpenAfterExport:=False, OptimizeFor:=wdExportOptimizeForPrint, Range:= _
                wdExportFromTo, From:=I, To:=I, Item:=wdExportDocumentContent, _
                IncludeDocProps:=False, KeepIRM:=False, CreateBookmarks:= _
                wdExportCreateHeadingBookmarks, DocStructureTags:=True, _
                BitmapMissingFonts:=False, UseISO19005_1:=False
        Next
    End If
    Exit Sub
lbl:
    MsgBox "Enter right page number", vbInformation, "KuTools for Word"
End Sub

3. Press F5 key, in Browse dialog, select a folder to place the PDF files.
doc split save pdf 1

4. Click OK, then enter the page numbers you want to split start and end.

doc split save pdf 2 doc split save pdf 3


5. Click OK. Now the pages have been saved as separate PDF files.
doc split save pdf 4


Split a Word document to separate files by pages/heading1/ break

If you just want to split a Word document to separate Word file, you can try Kutools for Word’s Split utility, it can split a document by heading1, page break, section break or pages as you need.

Kutools for Word, with more than 100 handy functions, makes your jobs easier. 

After installing Kutools for Word, please do as below:(Free Download Kutools for Word Now!)

1. Click Kutools Plus > Split.
doc split save pdf 5

2. In the Split Document dialog, choose a folder to place the documents, and select the one type you want to split by from Split by drop-down list.
doc split save pdf 6

3. Click OK. then the folder will be opened automatically after splitting. Now the document has been split into multiple documents.
doc split save pdf 7


Tabbed browsing & editing multiple Word documents/Excel workbooks as Firefox, Chrome, Internet Explore 10!

You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Word documents or Excel workbooks in one Word window or Excel window, and easily switch between them by clicking their tabs.
Click for free trial of Office Tab!

Browse multiple word documents in one window as Firefox

Recommended Word Productivity Tools

 

Kutools For Word - More Than 100 Advanced Features For Word, Save Your 50% Time

  • Complicated and repeated operations can be done one-time processing in seconds.
  • Insert multiple images across folders into Word document at once.
  • Merge and combine multiple Word files across folders into one with your desired order.
  • Split the current document into separate documents according to heading, section break or other criteria.
  • Convert files between Doc and Docx, Docx and PDF, collection of tools for common conversions and selection, and so on...
Comments (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
VBA code does not work. Keeps saying "enter right page number. Word document is 3 pages long. I added in 1 and 3 in the messageboxes and got the error.
This comment was minimized by the moderator on the site
Hi, Nico, I have try the code again, it works in my version window 10 64 2016, which version you use?
This comment was minimized by the moderator on the site
nicou should input the the pages that you want to convert...ie 1 (in first prompt screen) then <end page ie 10> in 2nd prompt screen. that is what i didand the code was working beautifully. Thanks Sunny for this sharing
This comment was minimized by the moderator on the site
is there a way to name the files from text in the document instead of page 1, page 2 ,etc?
This comment was minimized by the moderator on the site
Sorry I have no idea.
This comment was minimized by the moderator on the site
If anyone can help with this... I think I need to do the same thing...USE CASE:I have a word document with 100 pages. Each page is the result of a mail merge, so all pages are identical except for a few words.  The top of each page says, "Dear <name>"  where <name> is replaced with a different name on each page.ex:- Dear Becky- Dear Nico- Dear Sunny- Dear jgall7804
Currently this code outputs files as:
- Page_1.pdf- Page_2.pdf- Page_3.pdf
I know I can change line 16 where it says "\Page_"  to say "\Foo_"... so the output would be
- Foo_1.pdf- Foo_2.pdf
But I'm asking (and jgall7804, and Ines, and others)... if someone with better/smarter VBA skills can write the code that will output as:- becky.pdf- nico.pdf- sunnny.pdf- jgall7804.pdf
that is, find the 2nd word (or 1st word, or 10th word) on each page and use that word as the name of the file.
Anyone have any thoughts?
This comment was minimized by the moderator on the site
You could do this using the REN function if you open the CMD in the folder with the documents saved
This comment was minimized by the moderator on the site
OMG, you saved my life. I always need to do merge letters in word and then save each one individually in PDF. My last 40 letters was so fast!!! :)
This comment was minimized by the moderator on the site
Instead of saving each page as a separate document, how do I get the code to save every 2 or 3 pages as a separate document.
This comment was minimized by the moderator on the site
Can't find the code to handle your job now. Try the Kutools for Word, it is free for using in 60 days
This comment was minimized by the moderator on the site
Please kindly explain : (Renaming doc) You could do this using the REN function if you open the CMD in the folder with the documents saved - and also 2 pages docs into one pdf
This comment was minimized by the moderator on the site
I had able split document, need the guidance if i want to save the document with individual name
This comment was minimized by the moderator on the site
Is there also a possibility to save the files not as Page 1 or Page 2, but with a name based on the content of the page?
This comment was minimized by the moderator on the site
Hello,When I click okay, the screen disappears but nothing is saved?Is there another setting I need to enable somewhere?
Also, the save to goes to my One Drive local folder, if that might be an issue?Thanks
This comment was minimized by the moderator on the site
Very helpful and easy to use tip. Saved me a lot of time. Thank you so much.
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0  Characters
Suggested Locations