cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy an image file to clipboard AND How to insert an image file in a word document?

How to copy an image file to clipboard AND How to insert an image file in a word document?

------------------------------
Thanks & Regards,
Tejaskumar Darji
Sr. RPA Consultant-Automation Developer
------------------------------
1 BEST ANSWER

Helpful Answers

KotaSuto1
Level 5
Hi,

To copy an image file to clipboard, you can realize if you use Code Stage and write simple code below:
'Required External Reerences: System.Drawing.dll, System.Windows.Forms.dll
'Required Namespace Imports: System.Drawing, System.Windows.Forms
'Input Arguments: filePath As Text
Dim bmp As New Bitmap(filePath)
Clipboard.SetImage(bmp)
bmp.Dispose()​

28247.png

28248.png

28249.png
To Insert an image to a Word document, you can use the "Paste from Clipboard" action in the "MS Word VBO" object.

I hope this will help you :)

------------------------------
Kota Suto
Japan
------------------------------

View answer in original post

1 REPLY 1

KotaSuto1
Level 5
Hi,

To copy an image file to clipboard, you can realize if you use Code Stage and write simple code below:
'Required External Reerences: System.Drawing.dll, System.Windows.Forms.dll
'Required Namespace Imports: System.Drawing, System.Windows.Forms
'Input Arguments: filePath As Text
Dim bmp As New Bitmap(filePath)
Clipboard.SetImage(bmp)
bmp.Dispose()​

28247.png

28248.png

28249.png
To Insert an image to a Word document, you can use the "Paste from Clipboard" action in the "MS Word VBO" object.

I hope this will help you :)

------------------------------
Kota Suto
Japan
------------------------------