View Single Post
 
Old 11-09-2020, 02:11 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can't store content as 'FormattedText' to a variable. And what your code in post #1 does is store only the unformatted string.

To use the 'FormattedText' property in anything like you describe, you'd have to use something like:
Code:
RangeA.FormattedText = RangeB.FormattedText
then modify RangeB, before restoring it via code like:
Code:
RangeB.FormattedText = RangeA.FormattedText
RangeA.Text = vbNullstring
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote