![]() |
|
#10
|
||||
|
||||
|
To run it from the hyperlink. Put the cursor in the hyperlink and run the following modified version. This will copy the section to the clipboard and return to the start position
Code:
Sub SelectAndCopySection()
Dim oRng As Range
Dim oStart As Range
Dim lngSect As Long
Set oStart = Selection.Range
If oStart.Hyperlinks.Count = 1 Then
oStart.Hyperlinks(1).Follow
lngSect = Selection.Information(wdActiveEndSectionNumber) + 1
Set oRng = ActiveDocument.Sections(lngSect).Range
oRng.End = oRng.End - 1
oRng.Copy
oStart.Select
End If
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
| Tags |
| copy paste, word 2007 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Copy webcontent to a document | elmnas | Word VBA | 1 | 07-15-2014 10:08 PM |
Copy only Tables of a Document
|
Loretti | Word | 1 | 11-12-2012 03:35 PM |
Copy from one word document to another no identical
|
gmurphy | Word | 3 | 09-07-2011 04:28 AM |
How to get rid of Huge Gaps in my 300 pages Document?
|
SpaceMuppet | Word | 7 | 05-04-2011 12:26 PM |
WORD 2003 Need help splitting a HUGE Document
|
dlawson | Word | 4 | 04-14-2009 12:22 PM |