Article View: adobe.scripting.indesign
Article #20643Re: Scripting help, clipboard
From: Jesper Storm Bache
Date: Thu, 27 Jun 2002 16:59
Date: Thu, 27 Jun 2002 16:59
20 lines
1689 bytes
1689 bytes
(cross posted from scripting forum)
Illustrator places several formats on the clipboard when you do a copy (including bitmap). Here is how to show in your VB application what you have copied from Illustrator.
Create a new VB project. Create a form called "Form1". Add an Image field to that form called "Image1". Add a button to the form. Add the following code to the handler in that button:
����Dim myClip As Clipboard
����Dim myImage As IPictureDisp
' Get the global clipboard
����Set myClip = Clipboard
' Get the bitmap image data
����Set myImage = myClip.GetData(ClipBoardConstants.vbCFBitmap)
����' you can also use: vbCFEMetafile
' Update the form
����Form1.Image1.Picture = myImage
Now launch Illustrator. Copy something in Illustrator. Switch to your VB application and click on the button. Hope it works for you.
Technical Details
Message-ID:
<ef95d4b.2@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-08!supernews.com!feedme.news.mediaways.net!image.surnet.ru!surnet.ru!newsfeed.rt.ru!rt.ru!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef95d4b.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,2e48b186d4ef0738 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-06-27 10:11:23 PST From: "Jesper Storm Bache" <jesper@bache.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-08!supernews.com!feedme.news.mediaways.net!image.surnet.ru!surnet.ru!newsfeed.rt.ru!rt.ru!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Scripting help, clipboard Message-ID: <ef95d4b.2@WebX.aaQKaf7vad4> Date: Thu, 27 Jun 2002 09:59:59 -0700 References: <ef95d4b.-1@WebX.aaQKaf7vad4> Lines: 25 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit