![]() |
|
#7
|
|||
|
|||
|
Code:
Sub CopyHighlightsToOtherDoc()
Dim ThisDoc As Document
Dim ThatDoc As Document
Dim r As Range
Set ThisDoc = ActiveDocument
Set r = ThisDoc.Range
Set ThatDoc = Documents.Add
With r.Find
.Text = ""
.Highlight = True
Do While .Execute(Forward:=True) = True
ThatDoc.Range.InsertAfter r.Text & vbCrLf
r.Collapse 0
Loop
End With
End Sub
All highlighted text in the ActiveDocument are copied (with an added paragraph mark to separate them) to a new document. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Copy Text Twice to Paste into word | Albundy | Word | 2 | 09-02-2016 12:59 PM |
Find & selected paras with highlighted text & copy to clipboard
|
marceepoo | Word VBA | 1 | 09-14-2012 08:20 PM |
Table copy/paste suddenly text-only
|
mjcoon | Word Tables | 20 | 04-28-2012 08:53 PM |
| Can't copy/cut and paste text in Word 2002 | mmiller751 | Word | 0 | 04-17-2012 02:55 PM |
| Losing Text box data when copy and paste | Spay | Excel | 0 | 03-15-2011 07:18 AM |