Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-08-2020, 12:56 AM
alex100 alex100 is offline Replicate the copy/paste function, without involving the clipboard Windows 7 64bit Replicate the copy/paste function, without involving the clipboard Office 2016
Advanced Beginner
Replicate the copy/paste function, without involving the clipboard
 
Join Date: May 2020
Posts: 79
alex100 is on a distinguished road
Default Replicate the copy/paste function, without involving the clipboard

I am using the following code to save some content, then write it to another location inside the document.

Code:
Dim content As String
content = Selection.Text

Selection.TypeText (content)
The problem is the written content no longer preserves the format of the original one. For example, in case of text content, it only saves the text, but without preserving its font size, color, shading, etc. Beside text, the content can also contain images and tables.



So what I need is to replicate the functionality of the copy/paste function, but without messing up the clipboard content (which would happen if I would use the 'Selection.Copy' and then the 'Selection.Paste' instructions).

Alex
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 02:04 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