View Single Post
 
Old 09-03-2020, 04:53 AM
alex100 alex100 is offline Windows 7 64bit Office 2016
Advanced Beginner
 
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