This code allows the 11th paragraph of a document to be extracted and exported. It could of course be the 29th or 9th. But is it possible to use ExportFragment with a range that is, say, all the text between 2 specific words? Or all paragraphs beginning with a particular word or phrase? I am wondering how flexible it is, or whether it can only be used in the way set out in this code. Thanks.
Code:
Sub PartofText()
Dim oWDRange As Word.Range
Set oWDRange = ActiveDocument.Paragraphs(11).Range
oWDRange.ExportFragment "D:\Documents and Settings\Admin\My Documents\Reference_11.docx", wdFormatDocumentDefault
End Sub