Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2014, 10:03 PM
gmayor's Avatar
gmayor gmayor is offline Copy from a huge document Windows 7 64bit Copy from a huge document Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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

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 from a huge document Copy only Tables of a Document Loretti Word 1 11-12-2012 03:35 PM
Copy from a huge document Copy from one word document to another no identical gmurphy Word 3 09-07-2011 04:28 AM
Copy from a huge document How to get rid of Huge Gaps in my 300 pages Document? SpaceMuppet Word 7 05-04-2011 12:26 PM
Copy from a huge document WORD 2003 Need help splitting a HUGE Document dlawson Word 4 04-14-2009 12:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:12 PM.


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