Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Iceman[_2_] Iceman[_2_] is offline
external usenet poster
 
Posts: 2
Default Can I Pick out specific pages from a document and save to a file


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Can I Pick out specific pages from a document and save to a file

You can copy/paste specific pages from one document into a new document.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"Iceman" wrote in message
...



  #3   Report Post  
Dawnnil Dawnnil is offline
Junior Member
 
Posts: 0
Default

Hi Iceman,

Yes, you can save specific page as an individual document.

Here are 2 cases, each with a macro solution.

case 1. Extract Current Page and Save it as a New Document

Put cursor at a page you want to save as a file. Press "Alt+ F11" to open VBA editor.
Then create a new module and paste the following macro:

Sub SaveCurrentPageAsANewDoc()
Dim objNewDoc As Document
Dim objDoc As Document
Dim strFileName As String
Dim strFolder As String

' Initialization
Set objDoc = ActiveDocument

strFolder = InputBox("Enter folder path: ")
strFileName = InputBox("Enter file name: ")

' Copy current page.
objDoc.Bookmarks("\Page").Range.Select
Selection.Copy

' Open a new document to paste the selection.
Set objNewDoc = Documents.Add
Selection.Paste

objNewDoc.SaveAs FileName:=strFolder & "\" & strFileName & ".docx"
objNewDoc.Close
End Sub


Case 2: Extract Each Page and Save it as a New Document

Use the same way to create a new module and paste this macro:

Sub SaveEachPageAsADoc()
Dim objNewDoc As Document
Dim objDoc As Document
Dim nPageNumber As Integer
Dim strFolder As String
Dim objFileName As Range

' Initialization
Set objDoc = ActiveDocument

strFolder = InputBox("Enter folder path he ")

' Copy each page in the document to paste it into a new one.
For nPageNumber = 1 To ActiveDocument.ComputeStatistics(wdStatisticPages)
Application.Browser.Target = wdBrowsePage
ActiveDocument.Bookmarks("\page").Range.Select
Selection.Copy

Set objNewDoc = Documents.Add
Selection.Paste

' Save new doc with the name of "Page" & nPageNumber and get the first 20 characters of the new doc as part of the file name.
Set objFileName = objNewDoc.Range(Start:=0, End:=20)
objNewDoc.SaveAs FileName:=strFolder & "\" & "Page " & nPageNumber & " " & objFileName & ".docx"
objNewDoc.Close
Application.Browser.Next
Next nPageNumber
End Sub

This macro saves each page of your document as an individual file.

For more detailed information, you can refer to this article:

https://www.datanumen.com/blogs/2-qu...word-document/

Hope that helps!

Dawnnil

Last edited by Dawnnil : April 21st 17 at 05:03 AM
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SAVE AS HOW DO YOU PLACE A FILE IN A SPECIFIC LOCATION stanman Microsoft Word Help 1 September 16th 09 05:29 PM
How to fit a document in a specific number of pages ? PPJansen Page Layout 3 December 20th 06 02:33 PM
how can i print all the pages of a document that have a specific w tvscrtiptgirl Microsoft Word Help 4 May 10th 06 11:48 PM
How can I insert a watermark on specific pages of a document only phil carter Microsoft Word Help 1 September 16th 05 11:53 AM
How can I print a watermark on specific pages in a big document? jj Microsoft Word Help 1 February 2nd 05 05:52 PM


All times are GMT +1. The time now is 10:48 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"