Re: How to read pictures from a document and save to picture type file by the way of using VBA?

From: Stephen Lebans (ForEmailGotoMy.WebSite.-WWWdotlebansdotcom_at_linvalid.com)
Date: 05/10/04


Date: Mon, 10 May 2004 14:53:16 -0300

THe code was desinged to work with Word Picture objects not OLE objects.
You just have to change one line of code to make it work with an OLE
Object(at least in Access and VB it works this way).

' Call the method to ask the OLE control to copy its contents to the
ClipBoard
NameOfTheOLEobject.Action = 4

Let me know how you make out. I'm currently finishing another project
and do not have any time right now to update this Word solution.

--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"chenfeng" <chenfeng@mailto.com.cn> wrote in message
news:eqhiHlNNEHA.3400@TK2MSFTNGP09.phx.gbl...
> Thanks very much. It works.
> Can you help me for another problem. How can I extract OLE embedded
Objects
> and save as bmp file as original size and resolution? I find that code
in
> http://www.lebans.com/msword.htm can not correctly extract OLE
embedded
> Objects. For example, I use the code to extract a "Microsoft Equation
3.0
> OLE Object" in a DOC and save as a bmp file.Then I open the saved bmp
file
> using a paint editor, and find the bmp file is only a black color
filled
> file .
>
> "Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebansdotcom@linvalid.com>
> wrote in message news:ebt5YMLMEHA.2704@TK2MSFTNGP10.phx.gbl...
> > See:
> > http://www.lebans.com/msword.htm
> > Word.zip contains code to allow the user to extract embedded Images
at
> > original size and resolution.
> >
> >  Version 1.0
> >
> > --
> >
> > HTH
> > Stephen Lebans
> > http://www.lebans.com
> > Access Code, Tips and Tricks
> > Please respond only to the newsgroups so everyone can benefit.
> >
> >
> > "chenfeng" <chenfeng@mailto.com.cn> wrote in message
> > news:uATmromLEHA.644@tk2msftngp13.phx.gbl...
> > >   I have some word documents, in which have some pictures. How can
I
> > read
> > > the pictures from the documents and save to picture type files by
> > using VBA?
> > >   Thanks very much in advance!
> > >   With Kind Regards
> > >
> > >
> >
>
>


Relevant Pages

  • Re: Powerpoint/Word 2008 sound issue
    ... welcome to the wonderful world of OLE objects. ... OLE is a feature of Windows. ... On the Mac, Microsoft Office has implemented limited support for OLE. ...
    (comp.sys.mac.apps)
  • Re: OLE Class name associated with Microsoft Picture and Fax viewe
    ... The core issue here is that the MS Picture and Object Viewer application ... CANNOT function as an OLE Image server. ... Picture/Fax viewer. ... Dim dbs As Database, rst As DAO.Recordset ...
    (microsoft.public.access.modulesdaovba)
  • Re: Save a picturebox Picture into a Long Binary (OLE Object) field in a mdb
    ... Your post is a bit confusing since you use the expression "Long Binary (OLE ... [Also I'm assuming your are using Classic VB and not dotNet. ... You can do it without the OLE Container control with ADO using AppendChunk. ... of the picture - but no practical way in VB to load the 'PictureBox' without ...
    (microsoft.public.vb.database.dao)
  • Re: Images in access forms
    ... response I got suggested a problem with an OLE provider. ... > bound object frame to display a picture. ... > to be inserted into the database are .bmp ... > path is not included) in the bound object frame. ...
    (microsoft.public.access.forms)
  • Re: Replace an image with another one
    ... If you just unlink the OLE object in the Word doc as suggested, ... Your comment about the toolbar gave me a clue. ... Look for the picture toolbar somewhere one your screen. ... existing image in a Word document with a different one? ...
    (microsoft.public.word.newusers)