View Single Post
 
Old 11-09-2020, 06:11 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
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 of
Default

Could you clear RangeA after processing? Without knowing what the aim of the game is it's a bit difficult to judge. Here the formatted range is written to the end of the document and then the original is deleted.

Code:
Dim RangeA As Range
Dim RangeB As Range
    Set RangeA = Selection.Range
    Set RangeB = ActiveDocument.Range
    RangeB.Collapse 0
    RangeB.FormattedText = RangeA.FormattedText
    RangeA.Text = ""
__________________
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