Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i paste an image from clipboard to word through vb script ? 1

Status
Not open for further replies.

laks143

Programmer
Apr 20, 2009
20
GB
i am trying to paste an image from clipboard to word .can any one help me how to do it in vbscript.
 
What have you tried so far and where in your code are you stuck ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
set word= CreateObject("Word.Application")
Word.Visible = TRUE
Word.Documents.add()
word.document.parentwindow.clipboard.getimage()


i am getting stucked at 4th line ....

 
What about simply this ?
word.Selection.Paste

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV has provided a great example of how to do this in Microsoft Word. Regretfully you can't use this method everywhere though.

PCMagazine released an add-on DLL a number of years back that gives VBScript access to the clipboard. It was called WSHExtra.

You can download a copy from my site if you can't find it elsewhere.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top