Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 11-09-2020, 02:11 AM
macropod's Avatar
macropod macropod is offline Replicate the copy/paste function, without involving the clipboard Windows 10 Replicate the copy/paste function, without involving the clipboard Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,518
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to copy specific formated text from Word and paste from clipboard into a console application Userx Word VBA 0 10-09-2020 05:58 AM
How to paste as a single para from clipboard having multiple paragraph PRA007 Word VBA 8 12-04-2015 04:48 AM
Replicate a function from MS Visio? CamSTAR1 Excel 0 08-20-2013 07:13 PM
If Function Challenge involving date no1texan Excel 6 07-15-2012 12:58 PM
Replicate the copy/paste function, without involving the clipboard copy without using clipboard? g48dd Excel 3 07-16-2011 10:28 PM

Other Forums: Access Forums

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