Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-13-2014, 06:41 AM
Hoxton118 Hoxton118 is offline How flexible is ExportFragment? Windows 7 32bit How flexible is ExportFragment? Office 2010 32bit
Novice
How flexible is ExportFragment?
 
Join Date: Mar 2014
Posts: 21
Hoxton118 is on a distinguished road
Default How flexible is ExportFragment?


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
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Semi-flexible templates (couple of questions) mshanks Word 1 07-29-2009 06:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft