Reputation:
I am trying to copy an image from the clipboard to Microsoft Word using VBScript. How can I do this?
Upvotes: 0
Views: 3431
Reputation: 8379
I don't believe it is possible to direclty access the clipboard using vbscript. You can however very cleverly use vbscript to drive IE and use IE to do the grunt work for you. Have a look at this implementation
Upvotes: 0
Reputation: 100896
Are you in a WSH environment? Or is this in VBA?
In VBA, you simply do Application.Selection.Paste
.
In WSH:
Set wordapp = CreateObject("Word.Application")
wordapp.Visible = True
wordapp.Documents.Add
wordapp.Selection.Paste
Upvotes: 4