I am trying to copy an image from the clipboard to Microsoft Word using VBScript. How can I do this?
views:
610answers:
2
+4
A:
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
codeape
2009-04-20 09:05:38
A:
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
Conrad
2009-04-20 09:09:53
It might not be possible from pure VBScript, but since the question is about Word, it can be done easily by pasting the object in Word (see the answer by codeape)
0xA3
2009-04-20 09:26:19