Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 07-28-2016, 08:59 PM
gmayor's Avatar
gmayor gmayor is offline Copy Text only of a Content Control Windows 10 Copy Text only of a Content Control Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
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

In that case you will need a macro. The following should do the job, copying the formatted text of the content control containing the cursor to the clipboard.

Code:
Sub CopyCC_Content()
Dim oCC As ContentControl
Dim oRng As Range
    On Error GoTo lbl_Exit
    For Each oCC In ActiveDocument.ContentControls
        If Selection.InRange(oCC.Range) Then
            Set oRng = oCC.Range
            oCC.Delete
            oRng.FormattedText.Copy
            ActiveDocument.Undo 1
            Exit For
        End If
    Next oCC
lbl_Exit:
    Exit Sub
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Text only of a Content Control Content Control Copy - Copies Data and CC itself shammi_raj Word 3 03-30-2016 07:01 PM
Is there VBA to paste text into content control? kintap Word VBA 2 07-02-2014 07:42 AM
Copy content control entries to next table next page Mel_Herndon Word VBA 2 05-22-2014 05:07 PM
Copy Text only of a Content Control Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM
Templates: automatic text generation from Rich Text content control Chickenmunga Word 0 10-01-2008 11:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:22 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