2017-10-05 71 views
2

我不知道如何从桌面复制图像并使用VBA EXCEL MACRO将其粘贴到MS paint中。请帮助完成下面的代码。如何将图像从桌面粘贴到MS Paint使用VBA excel

子PasteImage()

Shell = ("MSPAINT") 

Dim ImagePath As String 
Dim PAINT As String 

    PAINT = "C:\Windows\System32\mspaint.exe" 
    ImagePath = "C:\Users\Admin\Desktop\5841762-image.jpg" 

回答

1

只需添加这

Shell PAINT & " """ & ImagePath & """" 
+0

非常感谢你:) –