Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2020, 04:53 AM
alex100 alex100 is offline Saving all clipboard data (text, images & formatting) to a variable Windows 7 64bit Saving all clipboard data (text, images & formatting) to a variable Office 2016
Advanced Beginner
Saving all clipboard data (text, images & formatting) to a variable
 
Join Date: May 2020
Posts: 79
alex100 is on a distinguished road
Default Saving all clipboard data (text, images & formatting) to a variable

To save the clipboard content to a variable, I use this code:



Code:
Dim MyData As DataObject
Dim strClip As String
Set MyData = New DataObject
MyData.GetFromClipboard
strClip = MyData.GetText
The problem is this saves only the text information.

Is there a way to save all clipboard data (text, images, formatting) to a variable?

Then, how could I write the data inside that variable to the document, similar to using the 'Selection.Paste' instruction?

Alex
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to assign the clipboard value to a variable? fosterpapillon Word VBA 4 03-06-2017 07:02 PM
Saving all clipboard data (text, images & formatting) to a variable ord vba replace the variable text with variable images to make offer products with images tanzinim Word VBA 4 12-30-2015 01:40 PM
Formatting imported data into a table with variable record sets ash6540 Excel 6 03-27-2014 04:13 AM
Saving all clipboard data (text, images & formatting) to a variable office 2007 clipboard - options & source formatting jeffk Word 3 08-28-2012 02:25 AM
Saving all clipboard data (text, images & formatting) to a variable Excel not saving all data and formatting TRT Excel 2 04-09-2009 12:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft