How to export part of a document as a new word document?

  • Thread starter Thread starter Daniel Mark
  • Start date Start date
D

Daniel Mark

Hello:

Is there a standard way to extract some pages from a existing word document
and export as a new word document?



thank you
-Daniel Mark
 
Word is not a page oriented application so exporting 'some pages' can be
problematical. It depends what is on the 'pages'.

The following macro will copy selected text to a new document:

Sub CopySelectedToNewDoc()
On Error GoTo Oops
Selection.Copy
Documents.Add Template:="Normal"
Selection.Paste
End
' ActiveDocument.Save
Oops:
MsgBox "Select the text you wish to copy first!"
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Hello Graham:
The following macro will copy selected text to a new document:

Sub CopySelectedToNewDoc()
On Error GoTo Oops
Selection.Copy
Documents.Add Template:="Normal"
Selection.Paste
End
' ActiveDocument.Save
Oops:
MsgBox "Select the text you wish to copy first!"
End Sub

I have no idea of how to use the above macro:)
May you give me some comments?

sorry for bothering you again.
thank you
-Daniel Mark
 
Thank you so much for that. Perfectly solved my problem. Ten years later, like a message in a bottle, eh?

Word is not a page oriented application so exporting 'some pages' can be
problematical. It depends what is on the 'pages'.

The following macro will copy selected text to a new document:

Sub CopySelectedToNewDoc()
On Error GoTo Oops
Selection.Copy
Documents.Add Template:="Normal"
Selection.Paste
End
' ActiveDocument.Save
Oops:
MsgBox "Select the text you wish to copy first!"
End Sub


--
 
Back
Top